MR JarFile was: Scanning multi version jars?
Alan Bateman
Alan.Bateman at oracle.com
Sun Dec 3 14:21:15 UTC 2017
On 15/09/2017 11:37, Alan Bateman wrote:
> On 15/09/2017 05:43, Greg Wilkins wrote:
>>
>> :
>>
>> The issue I have are that sometimes the class is trying to hide the
>> MR aspects, yet other times it is not. Specifically when iterating
>> it returns JarEntry instances that ignore versions and always return
>> the content to which they refer, yet if you obtain a JarEntry from
>> the getJarEntry API, it behaves differently and may return the
>> versioned content even if it has the un-versioned path.
> The entries and stream methods have been discussed here several times.
> The conclusion was that they would continue to enumerate or return a
> stream over all entries in the JAR file. A new versionedStream()
> method was proposed and I agree is needed, it just didn't make it into
> Java SE 9. Now might be the time to put it back on the table.
Just to follow up from on this thread from September.
jdk-10+34 has the JarFile::versionedStream and JarEntry::getRealName
methods that we've been discussing here to complete the API support for
MR JARs. It would be good to try them out and report back any issues
that you find.
-Alan
More information about the core-libs-dev
mailing list