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

ecki at zusammenkunft.net ecki at zusammenkunft.net
Thu Oct 15 20:59:01 UTC 2015


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

-- 
http://bernd.eckenfels.net

-----Original Message-----
From: Claes Redestad <claes.redestad at oracle.com>
To: "core-libs-dev at openjdk.java.net Libs" <core-libs-dev at openjdk.java.net>
Sent: Do., 15 Okt. 2015 22:43
Subject: RFR [9] 8139706: JarFile.getBytes could use InputStream.readNBytes

Hi all,

java.util.jar.JarFile could be improved further by using 
InputStream.readNBytes when there's information in the ZipEntry about 
the entry size.

Webrev: http://cr.openjdk.java.net/~redestad/8139706/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8139706

Testing: verified improvements in internal startup/footprint tests

/Claes



More information about the core-libs-dev mailing list