palantir / palantir-java-format

A modern, lambda-friendly, 120 character Java formatter.
Apache License 2.0
471 stars 48 forks source link

Illegal reflective access by com.palantir.javaformat.java.JavacTokens #735

Open akuzni2 opened 2 years ago

akuzni2 commented 2 years ago

What happened?

using the following plugging with versions

            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.22.3</version>
                <configuration>
                    <java>
                        <palantirJavaFormat>
                            <version>2.24.0</version>
                        </palantirJavaFormat>
                    </java>
                </configuration>
            </plugin>

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.palantir.javaformat.java.JavacTokens$CommentSavingTokenizer (file:/.m2/repository/com/palantir/javaformat/palantir-java-format/2.24.0/palantir-java-format-2.24.0.jar) to field com.sun.tools.javac.parser.JavaTokenizer.reader WARNING: Please consider reporting this to the maintainers of com.palantir.javaformat.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

What did you want to happen?

just reporting as the warning asked me to

carterkozak commented 2 years ago

Please see the documentation here: https://github.com/diffplug/spotless/tree/main/plugin-gradle#palantir-java-format and here: https://github.com/google/google-java-format/releases/tag/v1.10.0