Skip to content
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

Organize Imports sometimes doesn't work #50

Open
anthonyvdotbe opened this issue Oct 28, 2023 · 3 comments
Open

Organize Imports sometimes doesn't work #50

anthonyvdotbe opened this issue Oct 28, 2023 · 3 comments
Labels
question Further information is requested

Comments

@anthonyvdotbe
Copy link
Contributor

At the start, I had no imports.

The logs only say:

INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS
INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=jdk.internal.org.objectweb.asm.Attribute$Set ]
INFO [org.netbeans.modules.java.editor.imports.ComputeImports]: Cannot resolve type element "ElementHandle[kind=CLASS; sigs=jdk.internal.org.objectweb.asm.Attribute$Set ]".

I ended up importing everything via the quick fixes one by one. The required imports were:

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Set;

Extension version 1.0.0 with VS Code

Version: 1.83.1 (user setup)
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:48:05.904Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

@lahodaj
Copy link
Member

lahodaj commented Oct 30, 2023

In:
#51:
there are exceptions like:

Caused by: java.lang.NullPointerException: Cannot read field "outer" because "env" is null
	at com.sun.tools.javac.api.JavacScope.create(JavacScope.java:60)
	at com.sun.tools.javac.api.JavacTrees.getScope(JavacTrees.java:725)
	at com.sun.tools.javac.api.JavacTrees.getScope(JavacTrees.java:157)
	at org.netbeans.modules.java.editor.imports.ComputeImports$TreeVisitorImpl.visitIdentifier(ComputeImports.java:586)

Which would seem to explain the non-working organize imports (although it might also affect the quick fixes). It is unfortunately quite difficult to know what's wrong from the stack trace - a reproducible testcase would be awesome.

@anthonyvdotbe
Copy link
Contributor Author

If I run into this again, I'll make sure to provide a reproducer. It would be good if - whenever an exception occurs - the content of the file that caused the issue would be dumped to the log as well. So if I don't report the issue immediately, I can still provide the code that caused the exception.

@Achal1607 Achal1607 added the question Further information is requested label Nov 17, 2023
@anthonyvdotbe
Copy link
Contributor Author

Organize Imports doesn't work with the file below.
After doing Organize Imports, the line Index 12 out of bounds for length 12 is printed 4 times.
After doing Ctrl+A in the editor, the stacktrace in the log is printed. (So the stacktrace wasn't printed when I did Organize Imports, but it may have the same root cause.)

package be.anthonyv.ab.cdefgh.xyz.abcdefoobar;

import java.nio.file.Files;

class GenerateIndex {

    private static final Path FOO = Path.of("");

    public static void main(String... args) {
        var contents = Files.readString(FOO);
    }
}
Initiating server activation
Request to kill LSP server.
Cannot kill: current process is None
Launching Apache NetBeans Language Server with C:\dev\jdk-23 and userdir c:\Users\antho\AppData\Roaming\Code\User\workspaceStorage\070fdf86d9ccb23748e9956f95c76f85\asf.apache-netbeans-java
LSP server launching: 16876
LSP server user directory: c:\Users\antho\AppData\Roaming\Code\User\workspaceStorage\070fdf86d9ccb23748e9956f95c76f85\asf.apache-netbeans-java
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.netbeans.TopSecurityManager (file:/C:/Users/antho/.vscode/extensions/asf.apache-netbeans-java-20.0.301/nbcode/platform/lib/boot.jar)
WARNING: Please consider reporting this to the maintainers of org.netbeans.TopSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
Code Name                                          Version                               State    
-------------------------------------------------- ------------------------------------- ---------
org.netbeans.modules.options.java                  1.37                                  Enabled  
org.netbeans.modules.editor.settings.storage       1.75.0.1                              Enabled  
org.netbeans.modules.j2eeapis                      1.55                                  Enabled  
org.netbeans.modules.xml.xdm                       1.57.0.1                              Enabled  
org.netbeans.modules.csl.types                     1.23                                  Enabled  
org.netbeans.swing.plaf                            1.65                                  Enabled  
org.netbeans.modules.terminal                      1.50                                  Enabled  
org.netbeans.modules.gradle.dependencies           1.0.0.1.1                             Enabled  
org.apache.commons.httpclient                      3.1.0                                 Installed
org.netbeans.modules.editor.document               1.32.0.3                              Enabled  
org.netbeans.modules.extexecution                  1.72                                  Enabled  
org.netbeans.api.java                              1.89                                  Enabled  
org.netbeans.modules.languages.antlr               1.5                                   Enabled  
org.netbeans.modules.project.ant.ui                1.88                                  Enabled  
org.netbeans.html.presenters.spi                   1.8.1                                 Enabled  
org.netbeans.modules.options.api                   1.68                                  Enabled  
org.netbeans.modules.maven.refactoring             1.43.1                                Enabled  
org.openide.modules                                7.71                                  Enabled  
org.netbeans.modules.editor.guards                 1.56                                  Enabled  
org.netbeans.spi.tasklist                          1.58.0.1                              Enabled  
org.netbeans.modules.html.parser                   1.57.0.1                              Enabled  
org.netbeans.modules.javascript2.debug             1.41                                  Enabled  
org.netbeans.modules.jakartaee9.api                1.23                                  Enabled  
org.netbeans.lib.nbjavac                           1.39.0.4.3                            Enabled  
org.netbeans.modules.nbcode.integration            1.0                                   Enabled  
org.netbeans.modules.maven.persistence             1.52                                  Enabled  
org.netbeans.libs.graalsdk.system                  1.22                                  Installed
org.openide.util.lookup                            8.57                                  Enabled  
org.netbeans.modules.gradle.groovy                 1.12                                  Enabled  
org.netbeans.modules.maven                         2.162.0.1.1                           Enabled  
org.netbeans.modules.masterfs.nio2                 1.38                                  Enabled  
org.netbeans.modules.javascript2.lexer             1.29                                  Enabled  
org.netbeans.modules.debugger.jpda.projectsui      1.26                                  Enabled  
org.netbeans.modules.web.common                    1.122                                 Enabled  
org.netbeans.modules.java.openjdk.project          1.20                                  Enabled  
org.netbeans.api.annotations.common                1.51                                  Enabled  
org.netbeans.modules.nativeimage.api               0.15                                  Enabled  
org.netbeans.modules.testng.ui                     1.32                                  Enabled  
org.netbeans.core.netigso                          1.54                                  Enabled  
org.netbeans.modules.groovy.editor                 1.92                                  Enabled  
org.netbeans.libs.jna.platform                     2.18                                  Enabled  
org.netbeans.modules.refactoring.api               1.70.0.1                              Enabled  
org.netbeans.api.xml.ui                            1.67                                  Enabled  
org.netbeans.modules.server                        1.56                                  Enabled  
org.netbeans.libs.jaxb                             1.54                                  Enabled  
org.netbeans.modules.gradle.test                   1.19                                  Enabled  
org.openide.execution                              9.26                                  Enabled  
org.netbeans.modules.htmlui                        1.8                                   Installed
org.netbeans.modules.classfile                     1.75                                  Enabled  
org.netbeans.modules.gsf.codecoverage              1.55                                  Installed
org.netbeans.spi.quicksearch                       1.50                                  Enabled  
org.netbeans.modules.java.guards                   0.54                                  Installed
org.openide.windows                                6.100                                 Enabled  
org.apache.commons.logging                         1.3.0                                 Enabled  
org.netbeans.modules.xml.multiview                 1.61.0.2                              Enabled  
org.netbeans.modules.html                          1.84                                  Enabled  
org.netbeans.modules.sampler                       1.37                                  Enabled  
org.netbeans.modules.java.sourceui                 1.71.0.2.4.3.32.6                     Enabled  
org.netbeans.modules.gototest                      1.56                                  Enabled  
org.netbeans.modules.editor.deprecated.pre65format 1.54.0.1.6.23.55                      Enabled  
org.netbeans.modules.templates                     1.30                                  Enabled  
org.netbeans.modules.xml.xam                       1.55.0.1                              Enabled  
org.netbeans.modules.editor.errorstripe            2.57.0.1.1                            Enabled  
org.netbeans.modules.project.libraries.ui          1.75                                  Enabled  
org.netbeans.modules.projectapi                    1.94                                  Enabled  
org.netbeans.modules.cloud.common                  1.34                                  Enabled  
org.eclipse.jgit                                   6.8.0                                 Installed
org.netbeans.modules.extbrowser                    1.76                                  Enabled  
org.netbeans.modules.schema2beans                  1.70                                  Enabled  
org.netbeans.modules.javadoc                       1.78.0.2                              Enabled  
slf4j.api                                          1.7.36                                Enabled  
org.openide.actions                                6.62                                  Enabled  
org.netbeans.modules.java.source                   0.188.0.32.4.3.6.1                    Enabled  
org.netbeans.modules.editor                        1.110.0.6.3.23.55                     Enabled  
org.netbeans.modules.selenium2.webclient           1.30                                  Installed
org.netbeans.modules.javascript2.model             1.29                                  Enabled  
org.openide.loaders                                7.93                                  Enabled  
org.netbeans.modules.versioning.core               1.54.0.1.42                           Installed
org.openide.nodes                                  7.68                                  Enabled  
org.netbeans.modules.java.debug                    1.61.0.1.3.6                          Enabled  
org.netbeans.modules.keyring.fallback              1.31                                  Enabled  
org.netbeans.swing.outline                         1.57                                  Enabled  
org.netbeans.modules.versioning                    1.70.0.1                              Installed
com.jcraft.jsch                                    0.1.72                                Enabled  
org.netbeans.modules.languages.yaml                2.55                                  Enabled  
org.openide.io                                     1.72                                  Enabled  
org.netbeans.modules.projectuiapi.base             1.109.0.9                             Enabled  
org.netbeans.libs.antlr3.runtime                   1.44.0.1                              Enabled  
org.netbeans.modules.editor.codetemplates          1.67.0.1                              Enabled  
org.netbeans.api.xml                               1.67                                  Enabled  
org.netbeans.modules.java.testrunner               1.43                                  Enabled  
org.netbeans.modules.maven.junit                   1.57                                  Enabled  
net.java.html.geo                                  1.8.1                                 Installed
org.netbeans.modules.websvc.restlib                2.31                                  Enabled  
org.netbeans.libs.testng                           1.37                                  Enabled  
org.netbeans.modules.java.disco                    2.7                                   Enabled  
org.netbeans.modules.j2ee.persistenceapi           1.59.0.1                              Enabled  
org.netbeans.libs.jsch.agentproxy                  1.7                                   Installed
org.netbeans.libs.asm                              5.26                                  Enabled  
org.netbeans.lib.v8debug                           1.39                                  Installed
org.netbeans.modules.db.core                       1.60                                  Enabled  
org.netbeans.libs.flatlaf                          1.17                                  Enabled  
org.netbeans.modules.favorites                     1.69                                  Enabled  
org.netbeans.modules.gradle.persistence            1.19                                  Enabled  
org.netbeans.modules.j2ee.dd                       1.63.0.2                              Enabled  
org.netbeans.modules.maven.indexer.ui              2.57                                  Enabled  
org.netbeans.modules.db.metadata.model             1.34                                  Enabled  
org.netbeans.modules.options.keymap                1.60                                  Enabled  
org.netbeans.modules.project.spi.intern            1.26                                  Enabled  
org.netbeans.modules.project.indexingbridge        1.40                                  Enabled  
org.apache.commons.commons_io                      2.14                                  Enabled  
org.netbeans.libs.nbjavacapi                       21.1                                  Enabled  
org.netbeans.modules.queries                       1.66                                  Enabled  
org.netbeans.modules.libs.corba.omgapi             1.18                                  Enabled  
org.netbeans.modules.project.ant                   1.90                                  Enabled  
org.netbeans.modules.javascript2.doc               1.23                                  Enabled  
org.netbeans.modules.editor.mimelookup             1.63                                  Enabled  
org.netbeans.modules.editor.indent.project         1.45                                  Enabled  
org.netbeans.modules.java.lexer                    1.59                                  Enabled  
org.netbeans.spi.editor.hints                      1.65.0.8.55                           Enabled  
org.netbeans.modules.html.editor.lib               3.55                                  Enabled  
org.netbeans.modules.groovy.support                1.63                                  Enabled  
org.netbeans.modules.projectui                     1.82.0.8.9                            Enabled  
org.netbeans.modules.javascript2.editor            0.98                                  Enabled  
org.netbeans.spi.viewmodel                         1.74                                  Enabled  
org.netbeans.modules.web.indent                    1.43                                  Installed
org.netbeans.modules.languages.go                  1.3                                   Enabled  
org.netbeans.modules.progress.ui                   1.56                                  Enabled  
org.netbeans.modules.junitlib                      1.28                                  Enabled  
org.netbeans.modules.masterfs.ui                   2.26.0.2                              Enabled  
org.netbeans.modules.maven.junit.ui                1.28                                  Enabled  
org.netbeans.modules.lexer.antlr4                  1.5.0.1                               Enabled  
org.netbeans.modules.java.editor.base              2.88.0.1                              Enabled  
bcpkix                                             1.77                                  Enabled  
org.netbeans.core.multiview                        1.67                                  Enabled  
org.netbeans.modules.languages.toml                1.5                                   Enabled  
org.netbeans.modules.j2ee.eclipselinkmodelgen      1.55                                  Enabled  
org.netbeans.modules.code.analysis                 1.49                                  Enabled  
org.netbeans.modules.parsing.indexing              9.32.0.1.3.8                          Enabled  
org.netbeans.spi.debugger.ui                       2.81                                  Enabled  
net.java.html.boot.fx                              1.8.1                                 Installed
org.netbeans.modules.java.project                  1.95                                  Enabled  
org.netbeans.libs.lucene                           3.42                                  Enabled  
org.netbeans.modules.keyring.impl                  1.47                                  Enabled  
org.netbeans.modules.java.api.common               1.146                                 Enabled  
org.openide.explorer                               6.85                                  Enabled  
org.netbeans.modules.j2ee.persistence              1.78.0.1                              Enabled  
org.netbeans.modules.whitelist                     1.46                                  Enabled  
org.netbeans.modules.groovy.debug                  1.6                                   Enabled  
org.netbeans.modules.projectapi.nb                 1.27                                  Enabled  
org.openide.filesystems.compat8                    9.32                                  Enabled  
org.netbeans.modules.project.libraries             1.76                                  Enabled  
org.netbeans.modules.java.project.ui               1.98                                  Enabled  
libs.c.kohlschutter.junixsocket                    3.5                                   Enabled  
org.netbeans.modules.nbcode.integration.java       1.0                                   Installed
org.netbeans.modules.maven.embedder                2.78                                  Enabled  
org.netbeans.modules.html.lexer                    1.61                                  Enabled  
org.netbeans.core.osgi                             1.45                                  Installed
org.netbeans.libs.batik.read                       1.18.0.1                              Enabled  
org.netbeans.modules.java.hints.declarative        1.43.0.1.17.13                        Enabled  
org.netbeans.modules.netbinox                      1.64                                  Enabled  
org.netbeans.modules.selenium2.server              1.26                                  Enabled  
org.netbeans.modules.editor.structure              1.70.0.1                              Enabled  
org.netbeans.modules.parsing.lucene                2.59.0.1                              Enabled  
org.netbeans.modules.java.source.base              2.65.0.6.4.3.8.1                      Enabled  
org.netbeans.libs.graaljs                          1.23                                  Enabled  
org.netbeans.api.lsp                               1.24                                  Enabled  
org.netbeans.core.ui                               1.68                                  Enabled  
org.netbeans.modules.maven.model                   1.67                                  Enabled  
org.netbeans.modules.editor.bracesmatching         1.62.0.55                             Enabled  
org.apache.commons.lang3                           3.14.0                                Enabled  
org.netbeans.core.startup.base                     1.85.0.1                              Enabled  
org.netbeans.modules.dbapi                         1.57.0.30                             Enabled  
org.netbeans.modules.textmate.lexer                1.23.0.1                              Enabled  
org.netbeans.libs.json_simple                      0.35                                  Enabled  
org.netbeans.modules.maven.indexer                 2.63                                  Enabled  
org.netbeans.modules.html.indexing                 1.15                                  Installed
org.netbeans.modules.project.dependency            1.7.0.1                               Enabled  
org.netbeans.libs.junit4                           1.41                                  Enabled  
org.netbeans.libs.junit5                           1.20                                  Installed
org.netbeans.libs.javacapi                         8.47.0.3                              Enabled  
org.netbeans.modules.db.dataview                   1.56                                  Enabled  
org.netbeans.modules.defaults                      1.54                                  Enabled  
org.apache.xml.resolver                            1.54.0.12                             Enabled  
org.netbeans.modules.web.browser.api               1.68                                  Enabled  
org.netbeans.modules.autoupdate.services           1.79                                  Enabled  
org.netbeans.modules.editor.settings.lib           1.74.0.1                              Enabled  
org.netbeans.modules.selenium2                     1.28                                  Enabled  
org.netbeans.modules.debugger.jpda.truffle         1.20                                  Enabled  
org.netbeans.modules.extexecution.process          1.50                                  Enabled  
org.netbeans.modules.xml.catalog                   3.27.0.4                              Enabled  
org.netbeans.modules.java.source.ant               1.54.0.1.6                            Enabled  
org.netbeans.libs.snakeyaml_engine                 2.12                                  Enabled  
org.netbeans.core.network                          1.35                                  Enabled  
org.netbeans.modules.jakartaee9.platform           1.23                                  Enabled  
org.netbeans.spi.debugger.jpda.ui                  3.26                                  Enabled  
org.netbeans.modules.lexer.nbbridge                1.55.0.1                              Enabled  
org.netbeans.api.search                            1.44                                  Enabled  
org.netbeans.modules.java.platform.ui              1.65                                  Enabled  
org.netbeans.modules.masterfs.windows              1.39                                  Enabled  
org.openide.filesystems.nb                         9.33                                  Enabled  
org.netbeans.modules.keyring                       1.47                                  Enabled  
org.netbeans.api.templates                         1.31                                  Enabled  
org.netbeans.modules.csl.api                       2.81.0.2.1.1.8.1                      Enabled  
org.netbeans.modules.javaee.injection              1.29                                  Enabled  
org.netbeans.spi.palette                           1.69                                  Enabled  
org.netbeans.swing.laf.flatlaf                     1.16                                  Enabled  
bcutil                                             1.77                                  Enabled  
org.netbeans.libs.truffleapi                       1.23                                  Enabled  
org.netbeans.modules.autoupdate.cli                1.37                                  Enabled  
org.netbeans.spi.navigator                         1.61                                  Enabled  
org.netbeans.modules.uihandler                     2.58                                  Installed
org.netbeans.modules.parsing.nb                    1.27.0.8.1                            Enabled  
org.netbeans.modules.properties.syntax             1.73                                  Enabled  
org.netbeans.modules.janitor                       1.16                                  Installed
org.eclipse.jgit.lfs                               6.8.0                                 Installed
org.netbeans.modules.templatesui                   1.26                                  Installed
org.netbeans.libs.git                              1.58                                  Installed
org.eclipse.jgit.gpg.bc                            6.8.0                                 Installed
org.netbeans.spi.java.hints                        1.57.0.13.4.3.32.6.8                  Enabled  
org.netbeans.modules.javascript2.types             1.23                                  Enabled  
org.netbeans.modules.web.common.ui                 1.24                                  Installed
org.netbeans.modules.debugger.jpda                 1.132.0.80                            Enabled  
org.netbeans.bootstrap                             2.102                                 Enabled  
org.netbeans.modules.java.source.queries           1.41                                  Installed
org.netbeans.modules.refactoring.java              1.85.0.1.3                            Enabled  
org.netbeans.modules.properties                    1.78                                  Enabled  
org.netbeans.modules.cpplite.debugger              1.15                                  Enabled  
org.netbeans.modules.javascript2.json              1.26                                  Enabled  
org.netbeans.modules.print                         7.49                                  Enabled  
org.netbeans.modules.j2ee.metadata.model.support   1.54                                  Enabled  
org.netbeans.modules.j2ee.core                     1.48                                  Enabled  
org.netbeans.modules.debugger.jpda.ui              1.77                                  Enabled  
com.jcraft.jzlib                                   1.1.3                                 Enabled  
org.netbeans.libs.freemarker                       2.57.0.239                            Enabled  
org.openide.util                                   9.31                                  Enabled  
org.netbeans.modules.spi.actions                   1.51                                  Installed
org.netbeans.core.ide                              1.64                                  Enabled  
org.netbeans.modules.editor.breadcrumbs            1.40                                  Enabled  
org.netbeans.modules.editor.indent                 1.66                                  Enabled  
org.netbeans.modules.java.preprocessorbridge       1.72.0.1                              Enabled  
org.netbeans.modules.editor.actions                1.54.0.55                             Enabled  
org.apache.commons.codec                           1.16.0                                Enabled  
org.netbeans.api.debugger.jpda                     3.33                                  Enabled  
org.netbeans.core.io.ui                            1.53                                  Enabled  
org.netbeans.modules.cloud.oracle                  1.9                                   Enabled  
org.netbeans.libs.tomlj                            1.5                                   Enabled  
org.netbeans.html.xhr4j                            1.8.1                                 Enabled  
org.netbeans.api.progress.compat8                  1.70                                  Installed
org.openide.dialogs                                7.70                                  Enabled  
org.netbeans.modules.xml.jaxb.api                  1.49                                  Enabled  
org.netbeans.modules.junit                         2.97                                  Enabled  
org.netbeans.modules.projectuiapi                  1.112.0.8                             Enabled  
org.netbeans.libs.nashorn                          3.4                                   Enabled  
org.netbeans.modules.gsf.testrunner.ui             1.38.0.1                              Enabled  
org.netbeans.modules.gradle                        2.38                                  Enabled  
org.openide.awt                                    7.91                                  Enabled  
org.netbeans.modules.j2ee.metadata                 1.55                                  Enabled  
org.netbeans.modules.gradle.editor                 1.5                                   Enabled  
org.netbeans.modules.java.j2seplatform             1.66                                  Enabled  
org.netbeans.modules.debugger.jpda.projects        1.63                                  Enabled  
org.netbeans.modules.java.lsp.server               2.6.0.1.2.12.1.17.32.6.2.8.1.8.1.1.13 Enabled  
org.netbeans.modules.editor.settings               1.80                                  Enabled  
org.netbeans.api.io                                1.26                                  Enabled  
org.netbeans.api.intent                            1.25                                  Enabled  
org.netbeans.modules.java.testrunner.ui            1.27                                  Enabled  
org.netbeans.modules.testng                        2.43                                  Enabled  
org.netbeans.api.progress.nb                       1.71                                  Enabled  
org.netbeans.modules.xml.text                      1.82.0.1                              Enabled  
com.google.gson                                    2.8.9                                 Enabled  
org.netbeans.modules.java.completion               2.9.0.2                               Enabled  
org.netbeans.modules.dlight.nativeexecution        1.62.0.1                              Enabled  
org.netbeans.modules.options.editor                1.83                                  Enabled  
net.java.html.sound                                1.8.1                                 Installed
org.netbeans.api.progress                          1.71                                  Enabled  
org.openide.util.ui                                9.32                                  Enabled  
org.netbeans.modules.junit.ui                      1.30                                  Enabled  
org.netbeans.modules.editor.fold                   1.68                                  Enabled  
org.netbeans.modules.java.source.queriesimpl       1.40                                  Installed
com.google.guava.failureaccess                     1.0.1                                 Enabled  
org.netbeans.modules.maven.hints                   1.63                                  Enabled  
org.netbeans.modules.editor.fold.nbui              1.35.0.55                             Enabled  
org.openide.util.ui.svg                            1.17                                  Enabled  
org.netbeans.libs.javafx                           2.30                                  Installed
org.netbeans.modules.editor.completion             1.68.0.2                              Enabled  
org.openide.text                                   6.91                                  Enabled  
org.netbeans.modules.jumpto                        1.78.0.1                              Enabled  
org.netbeans.modules.java.nativeimage.debugger     0.13                                  Enabled  
org.netbeans.modules.xml.lexer                     1.53                                  Enabled  
org.netbeans.modules.xml.core                      1.66.0.4                              Enabled  
org.netbeans.libs.osgi                             1.45                                  Enabled  
org.netbeans.modules.db.drivers                    1.53                                  Enabled  
org.apache.tools.ant.module                        3.107.0.2                             Enabled  
org.netbeans.libs.jackson                          2.21                                  Enabled  
org.netbeans.modules.java.mx.project               1.12                                  Enabled  
org.netbeans.modules.jakartaee10.api               1.22                                  Installed
net.java.html.json                                 1.8.1                                 Enabled  
org.netbeans.core.startup                          1.86.0.1                              Enabled  
org.netbeans.modules.diff                          1.74.0.42.1                           Enabled  
org.netbeans.api.java.classpath                    1.77                                  Enabled  
org.netbeans.modules.lexer                         1.86.0.1                              Enabled  
org.netbeans.libs.jcodings                         0.12                                  Enabled  
org.netbeans.libs.commons_compress                 0.29.0.181                            Enabled  
org.netbeans.core.execution                        1.65                                  Enabled  
org.netbeans.modules.java.platform                 1.65                                  Enabled  
org.netbeans.modules.updatecenters                 1.63                                  Enabled  
org.netbeans.modules.swing.validation              1.55                                  Enabled  
org.netbeans.modules.java.hints.legacy.spi         1.40.0.1.13                           Enabled  
org.netbeans.swing.laf.dark                        2.18.0.2                              Installed
org.netbeans.core                                  3.74                                  Enabled  
org.netbeans.modules.sendopts                      2.59                                  Enabled  
org.netbeans.modules.java.hints                    1.106.0.17.3.12.1.1.32.6.1.1.13       Enabled  
net.java.html.boot                                 1.8.1                                 Enabled  
net.java.html.boot.script                          1.8.1                                 Installed
org.netbeans.modules.libs.groovy                   2.23                                  Enabled  
org.netbeans.modules.java.editor                   2.91.0.12.1.1.1                       Enabled  
org.netbeans.modules.java.file.launcher            1.0                                   Enabled  
org.netbeans.modules.editor.util                   1.88                                  Enabled  
org.netbeans.modules.micronaut                     1.12.0.1.2.1.1                        Enabled  
org.eclipse.jgit.ssh.jsch                          6.8.0                                 Installed
org.netbeans.modules.gradle.dists                  1.11                                  Enabled  
org.netbeans.modules.javascript.v8debug            1.33.0.1                              Installed
bcprov                                             1.77                                  Enabled  
com.google.guava                                   32.1.2                                Enabled  
org.netbeans.libs.antlr4.runtime                   1.24.0.1                              Enabled  
org.netbeans.libs.graalsdk                         1.23                                  Enabled  
org.netbeans.modules.dbschema                      1.64.0.4.30                           Enabled  
org.netbeans.api.maven                             1.29                                  Enabled  
org.netbeans.modules.settings                      1.72                                  Enabled  Language Client: Starting

org.netbeans.modules.go.lang                       1.4                                   Enabled  
org.netbeans.modules.j2eeserver                    1.134.0.1                             Enabled  
org.netbeans.modules.editor.errorstripe.api        2.55.0.1                              Enabled  
org.netbeans.modules.maven.groovy                  1.35                                  Enabled  
org.netbeans.modules.masterfs                      2.78.0.2                              Enabled  
bcpg                                               1.77                                  Installed
org.netbeans.lib.uihandler                         1.68                                  Installed
slf4j.jdk14                                        1.7.36                                Enabled  
org.netbeans.modules.languages.hcl                 1.3                                   Enabled  
org.netbeans.modules.markdown                      1.11                                  Enabled  
net.java.html                                      1.8.1                                 Enabled  
org.netbeans.modules.db                            1.92.0.30                             Enabled  
org.netbeans.modules.editor.lib                    4.30.0.23.3.55                        Enabled  
org.netbeans.modules.extexecution.process.jdk9     1.23                                  Enabled  
org.netbeans.modules.editor.mimelookup.impl        1.55                                  Enabled  
org.netbeans.modules.db.sql.editor                 1.60.0.30                             Enabled  
org.openide.filesystems                            9.36                                  Enabled  
org.netbeans.modules.editor.indent.support         1.65                                  Enabled  
org.netbeans.api.scripting                         1.20                                  Enabled  
org.netbeans.modules.libs.gradle                   8.5                                   Enabled  
org.netbeans.libs.flexmark                         1.16                                  Enabled  
org.netbeans.modules.jakartaee10.platform          1.22                                  Installed
org.netbeans.modules.extexecution.base             1.29                                  Enabled  
org.netbeans.api.htmlui                            1.31                                  Enabled  
org.netbeans.swing.tabcontrol                      1.80                                  Enabled  
org.netbeans.modules.j2ee.core.utilities           1.57                                  Enabled  
org.netbeans.modules.gsf.testrunner                2.35                                  Enabled  
org.netbeans.libs.jna                              2.18                                  Enabled  
org.netbeans.modules.j2ee.eclipselink              1.55                                  Enabled  
org.netbeans.html.ko4j                             1.8.1                                 Enabled  
org.netbeans.modules.gradle.java                   1.25.0.1.1                            Enabled  
org.netbeans.modules.editor.lib2                   2.43.0.55.3                           Enabled  
com.googlecode.javaewah.JavaEWAH                   1.1.6                                 Installed
org.netbeans.modules.javahelp                      2.64                                  Enabled  
org.netbeans.modules.css.lib                       2.3                                   Enabled  
org.netbeans.api.debugger                          1.78                                  Enabled  
org.netbeans.modules.parsing.api                   9.30.0.8                              Enabled  
-------------------------------------------------- ------------------------------------- ---------
Language Client: Ready
Index 12 out of bounds for length 12
Index 12 out of bounds for length 12
Index 12 out of bounds for length 12
Index 12 out of bounds for length 12
[Error - 3:45:02 PM] Request textDocument/codeAction failed.
  Message: Internal error.
  Code: -32603 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.lambda$consume$0(Server.java:316)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.consume(Server.java:314)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1575)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 15 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4j.jsonrpc.messages.Either.getLeft()" because the return value of "org.eclipse.lsp4j.Diagnostic.getCode()" is null
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.lambda$codeAction$22(TextDocumentServiceImpl.java:1020)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:193)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1686)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:144)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:574)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:546)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:662)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.codeAction(TextDocumentServiceImpl.java:1020)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 17 more

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

No branches or pull requests

3 participants