Skip to content

java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()' #943

@lost22git

Description

@lost22git

gradle: 8.4
openjdk: 21
palantir-graddle-plugin: 2.38.0

spotless {
  java {
    target '**/src/main/java/**/*.java', '**/src/test/java/**/*.java'
    palantirJavaFormat()
    removeUnusedImports()
  }

  groovyGradle { // for gradle groovy files
    greclipse() // Uses the formatting rules of Eclipse
  }
}
Step 'palantir-java-format' found problem in 'app/src/main/java/lost/test/quarkus/BaselineController.java':
'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'
java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'
        at com.palantir.javaformat.java.RemoveUnusedImports.getSimpleName(RemoveUnusedImports.java:245)
        at com.palantir.javaformat.java.RemoveUnusedImports.buildReplacements(RemoveUnusedImports.java:225)
        at com.palantir.javaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:209)
        at com.diffplug.spotless.glue.pjf.PalantirJavaFormatFormatterFunc.apply(PalantirJavaFormatFormatterFunc.java:42)
        at com.diffplug.spotless.FormatterFunc.apply(FormatterFunc.java:32)
        at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:82)
        at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:103)
        at com.diffplug.spotless.Formatter.compute(Formatter.java:246)
        at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:203)
        at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:190)
        at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:105)
        at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:89)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions