RFR [9] 8139706: JarFile.getBytes could use InputStream.readNBytes

Claes Redestad claes.redestad at oracle.com
Thu Oct 15 21:16:12 UTC 2015


Hi Bernd,

thanks for looking at this!

You're right about the semantic change for this patch in isolation, but 
compared to the previous implementation that used sun.misc.IOUtils the 
semantics are unchanged (compare with theprevious implementation of 
JarFiles::getBytes and sun.misc.IOUtils::readFully in 
http://hg.openjdk.java.net/jdk9/dev/jdk/rev/5537b74dea17 )

/Claes

On 2015-10-15 22:59, ecki at zusammenkunft.net wrote:
> Hello,
>
> This does change a bit the semantic of the length check. If the stream would return more bytes than the zipentry says the new version would ignore them, the  old version was consuming then and then fail the check. However I am not sure if this is relevant.
>
> Gruss
> Bernd
>




More information about the core-libs-dev mailing list