Skip to content

Conversation

cbm64chris
Copy link

Please consider merging this PR.

The formatter on Apache NetBeans (27 in my case) running JDK 25 throws java.lang.NoSuchMethodError when formatting Java.

Uplifting the googlejavaformat to version 1.28.0 resolves this issue.

java.lang.NoSuchMethodError: 'java.util.Queue com.sun.tools.javac.util.Log$DeferredDiagnosticHandler.getDiagnostics()'
at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:367)
at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:335)
at com.google.googlejavaformat.java.JavaInput.(JavaInput.java:277)
at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:270)
at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:257)
at de.funfried.netbeans.plugins.external.formatter.java.google.GoogleJavaFormatterWrapper.format(GoogleJavaFormatterWrapper.java:86)
at de.funfried.netbeans.plugins.external.formatter.java.google.GoogleFormatJob.format(GoogleFormatJob.java:68)
at de.funfried.netbeans.plugins.external.formatter.java.base.AbstractJavaFormatterService.format(AbstractJavaFormatterService.java:51)
at de.funfried.netbeans.plugins.external.formatter.FormatterServiceDelegate.format(FormatterServiceDelegate.java:94)
at de.funfried.netbeans.plugins.external.formatter.ui.editor.ExternalFormatterReformatTaskFactory$2.reformat(ExternalFormatterReformatTaskFactory.java:97)
at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:550)
at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:309)
at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:349)
at org.netbeans.modules.editor.indent.api.Reformat.reformat(Reformat.java:129)
at org.netbeans.editor.ActionFactory$FormatAction$1$1.run(ActionFactory.java:1862)
at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:333)
at org.netbeans.editor.ActionFactory$FormatAction$1.run(ActionFactory.java:1841)
at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:146)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)

@funfried
Copy link
Owner

I guess this is related to Java 25. Anyway thanks for the PR, I'll merge it now and try to update the plugin as soon as possible.

@funfried
Copy link
Owner

Damn, it seems I have some issue with the build. I don't think it's related to your changes, it seems something stopped working within the Maven Site Plugin. I have to fix that first ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants