RFR - 8132734: java.util.jar.* changes to support multi-release jar files

Steve Drach steve.drach at oracle.com
Wed Jan 13 16:47:20 UTC 2016


CCC had some suggestions to improve the code that was previously approved during review.  As a consequence, I had to make significant changes to the API, and I believe the code need further review.  Please review the latest iteration of the webrev for runtime support of multi-release jar files. 

Issue: https://bugs.openjdk.java.net/browse/JDK-8132734 <https://bugs.openjdk.java.net/browse/JDK-8132734> 
JEP 238: https://bugs.openjdk.java.net/browse/JDK-8047305 <https://bugs.openjdk.java.net/browse/JDK-8047305> 
Webrev: http://cr.openjdk.java.net/~sdrach/8132734/webrev.02/ <http://cr.openjdk.java.net/~sdrach/8132734/webrev.02/>

Here’s a list of things that were changed:

1. Removed setVersion, setRuntimeVersioned, and getRuntimeVersionedEntry.  Also removed the configuration lock.

2. Added a Release enum to represent releases.

3. Added a new constructor that uses the enum as one of it’s arguments.  This is the only way to make multi-release
   JarFile objects.

4. Added new code to provide runtime versioning for class loaders using the new constructor.

4. Made the “version” int final, removing the volatile modifier.

5. Made the two remaining public methods, getVersion and isMultiRelease final.

6. Added implSpec to getEntry and getJarEntry so potential subclassers are aware of how things work.

7. Rewrote and added tests to deal with the new constructor and the Release enum.

8. Added a simple http server to test getting jar files from both a local files system and from the network.


More information about the core-libs-dev mailing list