RFR: JDK-8189611: JarFile versioned stream and real name support

Alan Bateman Alan.Bateman at oracle.com
Fri Nov 17 11:35:14 UTC 2017


On 17/11/2017 02:18, Xueming Shen wrote:
> Hi,
>
> Please help review the change for JDK-8189611.
>
> issue: https://bugs.openjdk.java.net/browse/JDK-8189611
> webrev: http://cr.openjdk.java.net/~sherman/8189611/webrev
Just a few initial comments/questions on the API additions:

1. getRealName is very welcome but I think it should be a no-arg method 
on JarEntry, not JarFile. That would make it easier to use and also 
avoids the temptation to call JarFile.getRealName with an entry in a 
different JAR file.

2. JarFile.versionedStream() is very welcome too but the javadoc says 
"latest versioned entry" when it really means the highest version that 
is less than or equal to the runtime version that the JarFile was opened 
with. I suspect this one might take a few iterations to get the wording 
smooth.

3. Is ZipFile.entryNameStream really needed? Just asking because 
zf.stream().map(ZipEntry::getName) is possible today.

-Alan



More information about the core-libs-dev mailing list