RFR: JDK-8172432,jar cleanup/update for module and mrm jar

Mandy Chung mandy.chung at oracle.com
Mon Jan 9 23:46:55 UTC 2017


> On Jan 9, 2017, at 10:21 AM, Xueming Shen <xueming.shen at oracle.com> wrote:
> 
> Hi, 
> 
> Please review the following proposed changes for jar tool
> 
> issue: https://bugs.openjdk.java.net/browse/JDK-8172432 <https://bugs.openjdk.java.net/browse/JDK-8172432>
> webrev: http://cr.openjdk.java.net/~sherman/8172432/webrev <http://cr.openjdk.java.net/~sherman/8172432/webrev>
>              http://cr.openjdk.java.net/~sherman/8172432/webrev_top/ <http://cr.openjdk.java.net/~sherman/8172432/webrev_top/>
> 

This is a good cleanup.  This makes it easier to add any further validation such as JDK-8171830.

Main.java
 693                     warn("unexpected versioned entry: " + name);

Should this message be localized?  
1870     private static boolean isModuleInfoEntry(String name) {
1871         // root or versioned module-info.class
1872         return name.endsWith(MODULE_INFO) &&
1873             (name.length() == MODULE_INFO.length() || name.startsWith(VERSIONS_DIR));
This should return true if it starts with VERSIONS_DIR and the entry with “/module-info.class"

Validator.java
 314             } catch (Exception x) {}

Would it be better to report the error if any exception thrown rather than silently swallowing it?

Otherwise looks good.

Mandy



More information about the core-libs-dev mailing list