Skip to content

Typecheck jdk with nullness checker - #1145

Draft
aosen-xiong wants to merge 23 commits into
eisop:masterfrom
aosen-xiong:typecheck-jdk
Draft

aosen-xiong wants to merge 23 commits into
eisop:masterfrom
aosen-xiong:typecheck-jdk

Conversation

@aosen-xiong

Copy link
Copy Markdown
Collaborator

No description provided.

@aosen-xiong

Copy link
Copy Markdown
Collaborator Author

Ok, at least we can type check JDK with Java 17.

@aosen-xiong

Copy link
Copy Markdown
Collaborator Author

Not sure how to disable error and warning from the compiler while retain the error from the Nullness checker.

@aosen-xiong

Copy link
Copy Markdown
Collaborator Author

Without annotation processor, the Javac errors are gone. Does that mean the errors are coming the annotation processor?

@aosen-xiong

Copy link
Copy Markdown
Collaborator Author
../jdk/src/java.base/share/classes/java/util/Timer.java:124: error: variable queue might already have been assigned
            this.queue = queue;
                ^
../jdk/src/java.base/share/classes/java/util/Timer.java:125: error: variable thread might already have been assigned
            this.thread = thread;
                ^
../jdk/src/java.base/share/classes/java/util/Timer.java:126: error: variable queue might not have been initialized
        }
        ^

For those errors, I am not sure why the javac work with the annotation processor causes these errors. One thing I tried locally is rename the field to p and t, the errors are gone.

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.

2 participants