-
Notifications
You must be signed in to change notification settings - Fork 59
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
#438 Upgrade to support jdk17 #477
base: main
Are you sure you want to change the base?
Conversation
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: -0.00 (9.77 -> 9.77)
View detailed results in CodeScene
Absence of Expected Change Pattern
- jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/MethodScope.java is usually changed with: jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/FieldScope.java
- jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGeneratorConfigImpl.java is usually changed with: jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: -0.00 (9.77 -> 9.77)
View detailed results in CodeScene
Absence of Expected Change Pattern
- jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/MethodScope.java is usually changed with: jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/FieldScope.java
- jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGeneratorConfigImpl.java is usually changed with: jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: -0.00 (9.77 -> 9.77)
View detailed results in CodeScene
Absence of Expected Change Pattern
- jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/MethodScope.java is usually changed with: jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/FieldScope.java
- jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGeneratorConfigImpl.java is usually changed with: jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java
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 appreciate all the work that went into this, I'm just not sure how to best approach abandoning JDK 11 support.
The library could be used in bigger applications, that might still be tied to JDK 11.
I'm pondering a separate branch to keep supporting both JDK versions or simply making this a new major version, that expects JDK 17+, since there aren't many changes being added anyway, that an application still on JDK 11 couldn't live without.
That's why I haven't acted upon your PR yet.
I'm undecided how to tackle it.
- name: Setup Java 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 |
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.
question: Why is this needed for CodeQL now?
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
|
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.
nitpick: one empty line is enough 😛
@@ -12,6 +12,7 @@ | |||
<packaging>pom</packaging> | |||
|
|||
<properties> | |||
<maven.compiler.release>17</maven.compiler.release> |
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.
suggestion: Irrelevant compiler setting for a BOM.
<maven.compiler.release>17</maven.compiler.release> |
<maven.compiler.source>17</maven.compiler.source> | ||
<maven.compiler.target>17</maven.compiler.target> |
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.
suggestion: Changing these settings and then not using them feels somewhat pointless.
Fair enough to switch to the release
, but then let's please introduce a property for that again to be consistent.
<maven.compiler.source>17</maven.compiler.source> | |
<maven.compiler.target>17</maven.compiler.target> | |
<maven.compiler.release>17</maven.compiler.release> |
<showDeprecation>true</showDeprecation> | ||
<release>17</release> |
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.
suggestion: Let's please continue using the respective property here.
<release>17</release> | |
<release>${maven.compiler.release}</release> |
} else if (value instanceof Boolean boolean1) { | ||
node.add(boolean1); | ||
} else if (value instanceof Double double1) { | ||
node.add(double1); | ||
} else if (value instanceof Float float1) { | ||
node.add(float1); |
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.
suggestion: Let's please avoid ambiguous naming wherever possible, including not assigning numbered variable name, even for such short-lived ones.
} else if (value instanceof Boolean boolean1) { | |
node.add(boolean1); | |
} else if (value instanceof Double double1) { | |
node.add(double1); | |
} else if (value instanceof Float float1) { | |
node.add(float1); | |
} else if (value instanceof Boolean booleanValue) { | |
node.add(booleanValue); | |
} else if (value instanceof Double doubleValue) { | |
node.add(doubleValue); | |
} else if (value instanceof Float floatValue) { | |
node.add(floatValue); |
if (targetScope instanceof FieldScope scope && !scope.isFakeContainerItemScope()) { | ||
return this.populateFieldSchema(scope.asFakeContainerItemScope()); |
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.
nitpick: A less ambiguous variable would be nice.
if (targetScope instanceof FieldScope scope && !scope.isFakeContainerItemScope()) { | |
return this.populateFieldSchema(scope.asFakeContainerItemScope()); | |
if (targetScope instanceof FieldScope fieldScope && !fieldScope.isFakeContainerItemScope()) { | |
return this.populateFieldSchema(fieldScope.asFakeContainerItemScope()); |
if (targetScope instanceof MethodScope scope && !scope.isFakeContainerItemScope()) { | ||
return this.populateMethodSchema(scope.asFakeContainerItemScope()); |
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.
nitpick: Similarly here.
if (targetScope instanceof MethodScope scope && !scope.isFakeContainerItemScope()) { | |
return this.populateMethodSchema(scope.asFakeContainerItemScope()); | |
if (targetScope instanceof MethodScope methodScope && !methodScope.isFakeContainerItemScope()) { | |
return this.populateMethodSchema(methodScope.asFakeContainerItemScope()); |
<properties> | ||
<maven.compiler.release>17</maven.compiler.release> | ||
</properties> |
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.
suggestion: Irrrelevant compiler setting in a reactor POM.
<properties> | |
<maven.compiler.release>17</maven.compiler.release> | |
</properties> |
try to build with JDK17 since it's LTS version and widely used in organizations