RFR JDK-8165640: Enhance jar tool to allow module-info in versioned directories but not in base in modular multi-release jar files
Hi, Please help review the changes for https://bugs.openjdk.java.net/browse/JDK-8165640 http://cr.openjdk.java.net/~sherman/8146486/webrev There are two changes (1) to use the versioned module-info as the module descriptor to validate the versioned entries, if the root/base "/module-info.class" is missing. (2) -d to print out all available module-info entries, versioned included. Thanks, Sherman
On Feb 10, 2017, at 7:48 AM, Xueming Shen <xueming.shen@oracle.com> wrote:
Hi,
Please help review the changes for
https://bugs.openjdk.java.net/browse/JDK-8165640 http://cr.openjdk.java.net/~sherman/8146486/webrev
1781 sb.append("\n[").append(ename).append("]”); 1786 sb.append("\n name ").append(md.toNameAndVersion()); We can make jar -d output similiar to `java —-list-modules` and have the entry name next to the module name in the same line. module hi (module-info.class) module hi (META-INF/versions/10/module-info.class) 1759-1763: an alternative is to use stream().sorted().foreach(…) that you won’t need to create the names array. Otherwise, looks okay. Mandy
On 10 Feb 2017, at 13:01, Mandy Chung <mandy.chung@oracle.com> wrote:
On Feb 10, 2017, at 7:48 AM, Xueming Shen <xueming.shen@oracle.com> wrote:
Hi,
Please help review the changes for
https://bugs.openjdk.java.net/browse/JDK-8165640 http://cr.openjdk.java.net/~sherman/8146486/webrev
1781 sb.append("\n[").append(ename).append("]”); 1786 sb.append("\n name ").append(md.toNameAndVersion());
We can make jar -d output similiar to `java —-list-modules` and have the entry name next to the module name in the same line.
module hi (module-info.class) module hi (META-INF/versions/10/module-info.class)
1759-1763: an alternative is to use stream().sorted().foreach(…) that you won’t need to create the names array.
Yes, i prefer to stream approach too. (FWIW if Stream.toArray was used and performance was a concern that might motivate using a more imperative style).
Otherwise, looks okay.
+1 Paul.
On 2/10/17, 2:30 PM, Paul Sandoz wrote:
We can make jar -d output similiar to `java —-list-modules` and have the entry name next to the module name in the same line.
module hi (module-info.class) module hi (META-INF/versions/10/module-info.class)
updated to use the suggested format.
1759-1763: an alternative is to use stream().sorted().foreach(…) that you won’t need to create the names array.
Yes, i prefer to stream approach too. (FWIW if Stream.toArray was used and performance was a concern that might motivate using a more imperative style).
updated to use stream style. https://bugs.openjdk.java.net/browse/JDK-8165640 http://cr.openjdk.java.net/~sherman/8165640/webrev (webrev link is changed. the id was wrong in previous email) thanks sherman
On Feb 10, 2017, at 6:06 PM, Xueming Shen <xueming.shen@oracle.com> wrote:
updated to use stream style.
https://bugs.openjdk.java.net/browse/JDK-8165640 http://cr.openjdk.java.net/~sherman/8165640/webrev
Looks okay. A minor point is that you can use foreach instead of toArray but it would need to catch IOException inside foreach block. Mandy
participants (3)
-
Mandy Chung
-
Paul Sandoz
-
Xueming Shen