RFR: 8163798: Create a JarFile versionedStream method
steve.drach at oracle.com
Tue Sep 13 00:14:54 UTC 2016
I guess I’m going to keep doing this until I get it right ;-) Here’s another webrev that doesn’t use an exception for a common case, and addresses most of Mandy concerns.
> This version looks good.
> Can you add the javadoc to describe what the stream method returns (a union of the base entries + all versioned entries <= JarFile::getVersion.
> Nit: you may want to call jf.getVersion().major() once rather than the number of entries.
> Now that you have jdk.internal.util.jar internal API for MRJAR. It may be useful to add a static getRealName(JarFile jar, JarEntry entry) method for convenience such that jdeps and jlink can use this MRJAR-specific internal API and no need to use the shared secret. Maybe rename VersionedStream to VersionedJarFileHelper?
> You may want to use jdk.testlibrary.FileUtils and deleteFileTreeWithRetry may be what you want.
I can’t use it because it removes the top-level directory (i.e. JTwork/scratch).
More information about the core-libs-dev