RFR: 8157524 Revert JarFile methods "entries" and "stream" to Java 8 behavior
Steve Drach
steve.drach at oracle.com
Mon Jul 18 18:06:16 UTC 2016
>> Please review this change to JarFile that reverts JarFile::stream and JarFile::entries to JDK 8 behavior. The code is identical to that in JDK 8 except line 504 in JarEntryIterator that now uses a different constructor to create a JarFileEntry. I also added some implementation notes explaining how to create a versionedStream and a versionedEntries method.
>>
>> issue: https://bugs.openjdk.java.net/browse/JDK-8157524 <https://bugs.openjdk.java.net/browse/JDK-8157524>
>> webrev: http://cr.openjdk.java.net/~sdrach/8157524/webrev/index.html <http://cr.openjdk.java.net/~sdrach/8157524/webrev/index.html>
I put an updated webrev at http://cr.openjdk.java.net/~sdrach/8157524/webrev.01/index.html <http://cr.openjdk.java.net/~sdrach/8157524/webrev.01/index.html>
> For @implNote then you can put the example in {@code ...} and that will allow to use angled brackets (no need for < etc).
Okay. I doesn’t seem to allow nested @, so I just dropped the @Override annotations on the example
>
> In ModulePath then it would be good to move versionedStream to jarPackages.
It’s used in two places, moving it to jarPackages won’t work, I think. I also put a check in to see if it’s a multi-release jar.
> A comment on the method would be useful too although we have other changes coming to this code so we can do it then.
I put a comment in
>
> You should use an @apiNote, as this is presenting some interesting information on how to use this method and not some particular characteristics of the implementation.
Okay
>
> I would be inclined to drop the note for Enumeration and add a @see tag referencing the Stream returned method.
I actually had to use the versionedEntries method for jdeps. Because of that and because I don’t see the harm with leaving it in, I left it in.
More information about the core-libs-dev
mailing list