You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest release (1.10.0) via fmt-maven-plugin, I get the following warning when formatting my code.
09:24:58.285 [INFO] --- fmt-maven-plugin:2.11:format (default) @ xxxxx ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer (file:/Users/xxxx/.m2/repository/com/google/googlejavaformat/google-java-format/1.10.0/google-java-format-1.10.0.jar) to field com.sun.tools.javac.parser.JavaTokenizer.reader
WARNING: Please consider reporting this to the maintainers of com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
While the error is not fatal, it is something that inexperienced developers will need to be educated about. It is also generally accepted that warnings/errors should be addressed instead of ignored, as this can make it more difficult to identify actual issues when reviewing logs/output.
Similar issues have been seen in Jackson Afterburner (replaced by Jackson Blackbird, as the issue could not be addressed without major re-write).
The text was updated successfully, but these errors were encountered:
Adding the --add-exports= flags documented in https://github.com/google/google-java-format#jdk-16 should resolve those warnings. They're required for JDK 16 and newer which makes those diagnostics errors, but the same flags will suppress the warnings in earlier JDK versions.
I don't know java modules that well. But, has everyone accepted the fact that this is just the way it's going to have to be when using the google-java-formatter for the foreseeable future?
Using the latest release (
1.10.0
) viafmt-maven-plugin
, I get the following warning when formatting my code.While the error is not fatal, it is something that inexperienced developers will need to be educated about. It is also generally accepted that warnings/errors should be addressed instead of ignored, as this can make it more difficult to identify actual issues when reviewing logs/output.
Similar issues have been seen in Jackson Afterburner (replaced by Jackson Blackbird, as the issue could not be addressed without major re-write).
The text was updated successfully, but these errors were encountered: