-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE: Cannot invoke "org.eclipse.jdt.internal.compiler.ast.TypeReference.extraDimensions()" with version 2.24 #907
Labels
Comments
Looks to be an open issue with eclipse. See eclipse-jdt/eclipse.jdt.core#2494
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Rostislav Svoboda ***@***.***>
Sent: Wednesday, June 5, 2024 4:37:26 AM
To: revelc/formatter-maven-plugin ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [revelc/formatter-maven-plugin] NPE: Cannot invoke "org.eclipse.jdt.internal.compiler.ast.TypeReference.extraDimensions()" with version 2.24 (Issue #907)
Describe the bug
After move from 2.23.0 to 2.24.x I cannot build my project and I get Cannot invoke "org.eclipse.jdt.internal.compiler.ast.TypeReference.extraDimensions()" because "typeReference" is null
Versions (OS, Maven, Java, and others, as appropriate):
* 2.24.0, 2.24.1
* macOS 14.5 Sonoma (OS name: "mac os x", version: "14.5", arch: "aarch64", family: "mac")
* Others:
* Apache Maven 3.9.6
* Java version: 21.0.2, vendor: Eclipse Adoptium, runtime: /Users/rsvoboda/.sdkman/candidates/java/21.0.2-tem
* Default locale: en_US, platform encoding: UTF-8
To Reproduce
git clone https://github.com/quarkus-qe/quarkus-jdkspecifics
cd quarkus-jdkspecifics
FAIL:
mvn clean verify -DskipTests -DskipITs -Dformatter-maven-plugin.version=2.24.1 -Dquarkus.platform.version=3.11.0
PASS:
mvn clean verify -DskipTests -DskipITs -Dformatter-maven-plugin.version=2.23.0 -Dquarkus.platform.version=3.11.0
Expected behavior
Project compiles without error
Additional context
Last "caused by" from the stacktrace:
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.ast.TypeReference.extraDimensions()" because "typeReference" is null
at org.eclipse.jdt.core.dom.ASTConverter.convertToSingleVariableDeclaration (ASTConverter.java:3970)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:3537)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:2865)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:2298)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:2859)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:1965)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:1402)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:3109)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:3246)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:3133)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:738)
at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations (ASTConverter.java:208)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:3477)
at org.eclipse.jdt.core.dom.ASTConverter.convert (ASTConverter.java:1521)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert (CompilationUnitResolver.java:344)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached (ASTParser.java:1269)
at org.eclipse.jdt.core.dom.ASTParser.lambda$0 (ASTParser.java:1120)
at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles (JavaModelManager.java:5839)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST (ASTParser.java:1120)
at org.eclipse.jdt.core.dom.ASTParser.createAST (ASTParser.java:868)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.parseSourceCode (DefaultCodeFormatter.java:316)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.prepareFormattedCode (DefaultCodeFormatter.java:220)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format (DefaultCodeFormatter.java:184)
at net.revelc.code.formatter.java.JavaFormatter.doFormat (JavaFormatter.java:63)
at net.revelc.code.formatter.AbstractCacheableFormatter.formatFile (AbstractCacheableFormatter.java:84)
at net.revelc.code.formatter.FormatterMojo.doFormatFile (FormatterMojo.java:721)
at net.revelc.code.formatter.FormatterMojo.formatFile (FormatterMojo.java:667)
at net.revelc.code.formatter.FormatterMojo.execute (FormatterMojo.java:471)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
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:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
—
Reply to this email directly, view it on GitHub<#907>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHODI7ELUUK2SD7DLDG4PDZF3E4NAVCNFSM6AAAAABI2HBO7CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZTKMRVHAZDGNQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hello @hazendaz ! I believe this insidious bug has been fixed in the JDT by now, meaning full Java21 support should finally be at hand :) It would bring me real joy to see this plugin updated! If there is something I can do to help, let me know! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
After move from 2.23.0 to 2.24.x I cannot build my project and I get
Cannot invoke "org.eclipse.jdt.internal.compiler.ast.TypeReference.extraDimensions()" because "typeReference" is null
Versions (OS, Maven, Java, and others, as appropriate):
To Reproduce
Expected behavior
Project compiles without error
Additional context
Last "caused by" from the stacktrace:
The text was updated successfully, but these errors were encountered: