Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files [v4]

2024-12-16 Thread Christian Stein
On Mon, 16 Dec 2024 14:23:26 GMT, Christian Stein wrote: >> Please review this change ensuring all targeted classes in a MR-JAR file >> should target the same or a lower classfile version. The [JAR File >> Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) >>

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files [v4]

2024-12-16 Thread Jorn Vernee
On Mon, 16 Dec 2024 14:23:26 GMT, Christian Stein wrote: >> Please review this change ensuring all targeted classes in a MR-JAR file >> should target the same or a lower classfile version. The [JAR File >> Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) >>

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files [v4]

2024-12-16 Thread Christian Stein
> Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of JavaSE 9 reads: > >> A class file under a versioned direc

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files [v3]

2024-12-16 Thread Christian Stein
> Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of JavaSE 9 reads: > >> A class file under a versioned direc

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-13 Thread Alex Buckley
On 12/13/2024 7:31 AM, Christian Stein wrote: I'll update the message to read: `META-INF/versions/9/com/foo/Bar.class has class file version 69 (Java 25), but class file version 53 or less is required to target release 9 of the Java Platform` Saying "class file version 69" and "class file ver

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files [v2]

2024-12-13 Thread Christian Stein
> Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of JavaSE 9 reads: > >> A class file under a versioned direc

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-13 Thread Christian Stein
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-13 Thread Jorn Vernee
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Alex Buckley
Consider: META-INF/versions/9/com/foo/Bar.class has class file version 69.0, but class file version 53.0 or less is required to target release 9 of the Java Platform or, to use a term of art from the JAR File Spec: com/foo/Bar.class in versioned directory META-INF/versions/9 has class file

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Mandy Chung
On Thu, 12 Dec 2024 16:27:23 GMT, Christian Stein wrote: >>> `release of {0} too high: {1}` >> >> I think this is better. Probably good enough. >> >> My concern stems from the fact that 'release' doesn't seem to be defined for >> _class files_. I see that the term 'release' exists, and maps to

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 12 Dec 2024 16:00:52 GMT, Jorn Vernee wrote: >> According to above's prior-art, it could just read `release of {0} too high: >> {1}` > >> `release of {0} too high: {1}` > > I think this is better. Probably good enough. > > My concern stems from the fact that 'release' doesn't seem to b

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Jorn Vernee
On Thu, 12 Dec 2024 15:34:20 GMT, Christian Stein wrote: > `release of {0} too high: {1}` I think this is better. Probably good enough. My concern stems from the fact that 'release' doesn't seem to be defined for _class files_. I see that the term 'release' exists, and maps to a versioned dir

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 12 Dec 2024 15:26:20 GMT, Christian Stein wrote: >> In this context the actual class file major version doesn't add any value to >> communicate the issue to the user: >> - `javac --release N` and >> - `jar --release N` use the "Java release feature number" in their options, >> so does t

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 12 Dec 2024 15:32:40 GMT, Christian Stein wrote: >> Maybe this reads better? `release version of {0} too high: {1}`: >> >> release version of META-INF/versions/9/version/Version.class too high: 25 >> release version of META-INF/versions/10/version/Version.class too high: 25 >> >> Note t

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 12 Dec 2024 15:29:33 GMT, Christian Stein wrote: >> User-facing help messages read: >> >> javac --help >> ... >> --release >> Compile for the specified Java SE release. >> Supported releases: >> 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 12 Dec 2024 15:23:43 GMT, Christian Stein wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line 94: >> >>> 92: unexpected versioned entry {0} for release {1} >>> 93: error.release.value.toohigh.versioned.entry=\ >>> 94: classfile release valu

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 12 Dec 2024 14:47:24 GMT, Jorn Vernee wrote: >> Please review this change ensuring all targeted classes in a MR-JAR file >> should target the same or a lower classfile version. >> >> For example, having compiled source files with `javac` 25 without using the >> `--release` option (or w

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Jorn Vernee
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. > > For example, having compiled source files with `javac` 25 without using the > `--release` option (or wi

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Christian Stein
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. > > For example, having compiled source files with `javac` 25 without using the > `--release` option (or wi

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Jorn Vernee
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. > > For example, having compiled source files with `javac` 25 without using the > `--release` option (or wi

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Jan Lahoda
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. > > For example, having compiled source files with `javac` 25 without using the > `--release` option (or wi

RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-11 Thread Christian Stein
Please review this change ensuring all targeted classes in a MR-JAR file should target the same or a lower classfile version. For example, having compiled source files with `javac` 25 without using the `--release` option (or with `--release 25`) and trying to archive them via a `jar --create --