RFR JDK-8066678: java.nio.channels.Channels cleanup
Alan Bateman
Alan.Bateman at oracle.com
Thu Dec 4 14:54:14 UTC 2014
On 04/12/2014 14:46, Pavel Rappo wrote:
> :
>
> But can we simply go a little bit further and change it to just:
>
> if (in instanceof FileInputStream) {
> return ((FileInputStream) in).getChannel();
> }
> ?
>
> Does anybody recall why it was that way in the first place?
I can't see any reason why it wasn't done this way originally, I can
only assume it was a concern at the time with classes that extend
FileInputStream.
-Alan.
More information about the nio-dev
mailing list