Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Noticed this in the JDK 21 report on Github. Looks like ClassFileVisitorUtilsTest might be importing classes that are hidden or gone in Java 21:
[ERROR] Step 'palantir-java-format' found problem in 'src/test/java/org/apache/maven/shared/dependency/analyzer/ClassFileVisitorUtilsTest.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:88)
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.spotless.maven.SpotlessCheckMojo.process (SpotlessCheckMojo.java:54)
at com.diffplug.spotless.maven.AbstractSpotlessMojo.execute (AbstractSpotlessMojo.java:229)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.188 s
[INFO] Finished at: 2024-02-05T04:40:59Z
Attachments
Issue Links
- is fixed by
-
MSHARED-1356 Upgrade Parent to 42
- Closed