Skip to content

[MSHARED-1416] - Review and improve the term "Jdk revision" - #129

Open
belingueres wants to merge 1 commit into
apache:masterfrom
belingueres:MSHARED-1416
Open

[MSHARED-1416] - Review and improve the term "Jdk revision"#129
belingueres wants to merge 1 commit into
apache:masterfrom
belingueres:MSHARED-1416

Conversation

@belingueres

@belingueres belingueres commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #100 : [MSHARED-1416] - Review and improve the term "Jdk revision"

  • renamed jdkRevision to maxJavaClassVersion.
  • deprecated jdkRevision's getter & setter.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

- renamed jdkRevision to maxJavaClassVersion.
- deprecated jdkRevision's getter & setter.

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incomplete.

* The highest JVM revision available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM that guarantees compatibility.
* The highest Java class version available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM version that guarantees compatibility.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is it JVM version or Java byte code version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JVM version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really doubt that's right. If it is, then the field is incorrectly named. One of them is certainly wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The javadoc comment most probably is confusing. How about this comment:

/**
 * The highest Java version required by any class in the JAR (e.g. "17" if the newest
 * class file version present corresponds to Java 17).
 * <p>
 * Because this is the highest requirement across all classes, it also serves as the
 * minimum JVM version needed to safely run the entire JAR. The JAR may still happen
 * to run on an older JVM if the classes requiring this version are never invoked,
 * but that isn't guaranteed.
 */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is right, the field name is wrong. I'm prettys sure the field name is wrong whether this is right or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field name is the one agreed in the issue's discussion (#100)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't mean the field name is correct. And the docs are still inconsistent.

*
* @since 3.2.1
*/
public void setMaxJavaClassVersion(String maxJavaClassVersion) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a setter at all?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it is the only way to set a value to the variable.

* The highest JVM revision available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM that guarantees compatibility.
* The highest Java class version available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM version that guarantees compatibility.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really doubt that's right. If it is, then the field is incorrectly named. One of them is certainly wrong.

/**
* The highest JVM revision available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM that guarantees compatibility.
* The highest Java class version available in any class files. While the JAR may work on earlier JVMs if particular

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think "Java class version" is a thing. This also needs to be very clear about whether you're talking about the class file format version or the Java version

* The highest JVM revision available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM that guarantees compatibility.
* The highest Java class version available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM version that guarantees compatibility.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is right, the field name is wrong. I'm prettys sure the field name is wrong whether this is right or not.

* The highest JVM revision available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM that guarantees compatibility.
* The highest Java class version available in any class files. While the JAR may work on earlier JVMs if particular
* classes are not used, this is the minimum JVM version that guarantees compatibility.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't mean the field name is correct. And the docs are still inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MSHARED-1416] Review and improve the term "Jdk revision"

2 participants