Skip to content
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

Issue #9146: upgrade minimal required jdk version to 11 #9281

Closed
wants to merge 3 commits into from

Conversation

pbludov
Copy link
Member

@pbludov pbludov commented Feb 15, 2021

Issue #9146
Not to merge. This PR is about finding out how ready we are to move to java 11.

When all the issues are resolved, the last PR will have to add a new check to CI to make sure that the code in master can be built with --source=11.

pom.xml Outdated Show resolved Hide resolved
@@ -1,3 +1,4 @@
//non-compiled with javac: Compilable with Java8
Copy link
Member Author

Choose a reason for hiding this comment

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

The underscore (_) is not a valid name for a variable since java9.

Copy link
Member

Choose a reason for hiding this comment

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

@pbludov Are you saying you can't name variables like MY_EXAMPLE_HERE anymore for constants?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, just the underscore itself: _ invalid, but __ valid. Comes from http://openjdk.java.net/jeps/302

@pbludov
Copy link
Member Author

pbludov commented Feb 15, 2021

New SpotBugs errors:

[ERROR] Low: JavadocDetailNodeParser.errorListener not initialized in constructor and dereferenced in com.puppycrawl.tools.checkstyle.JavadocDetailNodeParser.getFirstNonTightHtmlTag(JavadocParser) [com.puppycrawl.tools.checkstyle.JavadocDetailNodeParser] At JavadocDetailNodeParser.java:[line 534] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
[ERROR] Low: AbstractCheck$FileContext.fileContents not initialized in constructor and dereferenced in com.puppycrawl.tools.checkstyle.api.AbstractCheck.getLine(int) [com.puppycrawl.tools.checkstyle.api.AbstractCheck] At AbstractCheck.java:[line 294] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
[ERROR] Low: AbstractCheck$FileContext.fileContents not initialized in constructor and dereferenced in com.puppycrawl.tools.checkstyle.api.AbstractCheck.getLines() [com.puppycrawl.tools.checkstyle.api.AbstractCheck] At AbstractCheck.java:[line 284] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
[ERROR] Low: AbstractFileSetCheck$FileContext.fileContents not initialized in constructor and dereferenced in com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck.log(int, int, String, Object[]) [com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck] At AbstractFileSetCheck.java:[line 219] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR

Why don't we get these violations for Java8 builds?

@pbludov
Copy link
Member Author

pbludov commented Feb 18, 2021

TODO:

@pbludov
Copy link
Member Author

pbludov commented Jun 3, 2021

closing for now, will return to this issue later.

@pbludov pbludov closed this Jun 3, 2021
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.

None yet

2 participants