palantir / palantir/palantir-java-format

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

Open
#735 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
907
Forks
101
Avg merge
1d 3h
Merged PRs (30d)
19

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the warning with the reported spotless-maven-plugin 2.22.3 and palantir-java-format 2.24.0 configuration. Start by inspecting com.palantir.javaformat.java.JavacTokens$CommentSavingTokenizer and its access to com.sun.tools.javac.parser.JavaTokenizer.reader. Done means the reported setup no longer emits the illegal reflective access warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.