-
Notifications
You must be signed in to change notification settings - Fork 9
[MSHARED-1416] - Review and improve the term "Jdk revision" #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,10 +57,10 @@ public class JarClasses { | |
| private boolean isDebugPresent; | ||
|
|
||
| /** | ||
| * 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so is it JVM version or Java byte code version?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JVM version
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The javadoc comment most probably is confusing. How about this comment:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| */ | ||
| private String jdkRevision; | ||
| private String maxJavaClassVersion; | ||
|
|
||
| /** | ||
| * Constructor to create an empty instance. | ||
|
|
@@ -130,12 +130,48 @@ public void setDebugPresent(boolean hasDebugSymbols) { | |
| this.isDebugPresent = hasDebugSymbols; | ||
| } | ||
|
|
||
| /** | ||
| * Get 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. | ||
| * | ||
| * @return the highest Java class version available in any class files, or null if not known. | ||
| * | ||
| * @since 3.2.1 | ||
| */ | ||
| public String getMaxJavaClassVersion() { | ||
| return maxJavaClassVersion; | ||
| } | ||
|
|
||
| /** | ||
| * Set 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. | ||
| * | ||
| * @param maxJavaClassVersion the highest Java class version available in any class files. | ||
| * | ||
| * @since 3.2.1 | ||
| */ | ||
| public void setMaxJavaClassVersion(String maxJavaClassVersion) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need a setter at all?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| this.maxJavaClassVersion = maxJavaClassVersion; | ||
| } | ||
|
|
||
| /** | ||
| * The JDK revision of the classes in the JAR. | ||
| * @return the JDK revision of the classes in the JAR, or null if not known. | ||
| * @deprecated since 3.2.1, use {@link #getMaxJavaClassVersion()} instead, which is more accurate name. | ||
| */ | ||
| @Deprecated | ||
| public String getJdkRevision() { | ||
| return jdkRevision; | ||
| return getMaxJavaClassVersion(); | ||
| } | ||
|
|
||
| /** | ||
| * Set the JDK revision of the classes in the JAR. | ||
| * @param jdkRevision the JDK revision of the classes in the JAR. | ||
| * @deprecated since 3.2.1, use {@link #setMaxJavaClassVersion(String)} instead, which is more accurate name. | ||
| */ | ||
| @Deprecated | ||
| public void setJdkRevision(String jdkRevision) { | ||
| this.jdkRevision = jdkRevision; | ||
| setMaxJavaClassVersion(jdkRevision); | ||
| } | ||
|
|
||
| public List<String> getMethods() { | ||
|
|
||
There was a problem hiding this comment.
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