API: Extend FileIO in optional interfaces#5576
Conversation
|
@danielcweeks @rdblue @flyrain @szehon-ho @stevenzwu @jackye1995, could you take a look? |
| * libraries. | ||
| */ | ||
| public interface CredentialSupplier { | ||
| public interface CredentialSupplier extends FileIO { |
There was a problem hiding this comment.
All these interfaces assume they are mixed-in by FileIO instances (see docs).
There was a problem hiding this comment.
This is not quite correct. CredentialSupplier may extend other interfaces and not just FileIO.
There was a problem hiding this comment.
You are right. I misinterpreted the doc.
|
I don't think we should do this for |
|
@aokolnychyi this doesn't seem to be a problem in current code. I assume you ran into this need of casting in some new code you are working on? I found the interface name of Another downside is that |
|
@stevenzwu, this becomes an issue when we need both the optional functionality as well the core |
|
agree that I am trying to understand the concrete issue (type cast problem) that this tries to help with. Are we trying to type cast a if we want to access |
|
Thanks, @aokolnychyi! |
This PR extends
FileIOin its optional interfaces. This way, we we can access all methods available inFileIOif we have a reference to the optional interface. Otherwise, we have to cast back.