RFR: 8153654: Update jdeps to be multi-release jar aware

Mandy Chung mandy.chung at oracle.com
Fri Sep 16 20:18:33 UTC 2016


> On Sep 16, 2016, at 11:40 AM, Steve Drach <steve.drach at oracle.com> wrote:
> 
> A relatively minor update.  I simplified VersionHelper.  No other changes.
> 
> http://cr.openjdk.java.net/~sdrach/8153654/webrev.12/ <http://cr.openjdk.java.net/~sdrach/8153654/webrev.12/>

This looks good.  Thanks for the update.

Minor comments below and you can make the change before you push (no need for a new webrev).

MultiReleaseException.java 
   key and msg should be final fields

VersionHelper.java
  nameToVersion can simply be Map<String,Integer> (I missed this last round)

  63     public static void add(JarFile jarfile, JarEntry e, ClassFile cf) throws ConstantPoolException {

- can you break “throws …” to the next line.

  56                 String name = cf.getName().replace('/', '.');
  57                 nameToVersion.put(name, version);

Can you add a check to make sure the version is the same if the entry is present; otherwise, throw InternalError.  This will catch any unexpected code path.

Mandy


More information about the core-libs-dev mailing list