Travis created NETBEANS-3019:
--------------------------------

             Summary: NullPointerException during copy/paste of Java 12 code 
(in the attached project)
                 Key: NETBEANS-3019
                 URL: https://issues.apache.org/jira/browse/NETBEANS-3019
             Project: NetBeans
          Issue Type: Bug
          Components: java - Source
    Affects Versions: 11.1
            Reporter: Travis
            Assignee: ARUNAVA SINHA


I got the exception below in a fresh installation of Netbeans 11.1.  This is 
after I installed nb-javac 1.6, but zero other plugins.  I'm using Gradle 5.5 
on Windows 10, but that probably makes no difference here.

The bug can be reproduced using the attached small project, which I 
painstakingly distilled out from a large code base where this bug was first 
found. To trigger the exception, you need to copy "CopyMe" from Source.java and 
paste it into Destination.java.  Upon pasting, the "Import Classes" dialog will 
appear.  Immediately after pressing the "OK" button, this exception happens:

 

java.lang.NullPointerExceptionjava.lang.NullPointerException at 
com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:334) at 
org.netbeans.lib.nbjavac.services.NBResolve.isAccessible(NBResolve.java:72) at 
com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:379) at 
com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:441) at 
org.netbeans.lib.nbjavac.services.NBResolve.isAccessible(NBResolve.java:66) at 
com.sun.tools.javac.api.JavacTrees.isAccessible(JavacTrees.java:913) at 
org.netbeans.api.java.source.GeneratorUtilities.getImportedElement(GeneratorUtilities.java:1826)
 at 
org.netbeans.api.java.source.GeneratorUtilities.addImports(GeneratorUtilities.java:1173)
 at 
org.netbeans.api.java.source.SourceUtils.resolveImport(SourceUtils.java:403) at 
org.netbeans.modules.java.editor.imports.ClipboardHandler$1.run(ClipboardHandler.java:154)
 at 
org.netbeans.modules.java.editor.imports.ClipboardHandler$1.run(ClipboardHandler.java:126)
 at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673) at 
org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663) at 
org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502) at 
org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
 at 
org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
 at 
org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
 at 
org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181) 
at 
org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178) 
at 
org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
 at 
org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
 at 
org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
 at 
org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) at 
org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
 at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81) 
at 
org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
 at 
org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423) 
at 
org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
 at 
org.netbeans.modules.java.editor.imports.ClipboardHandler.doImport(ClipboardHandler.java:126)
 at 
org.netbeans.modules.java.editor.imports.ClipboardHandler.access$100(ClipboardHandler.java:113)
 at 
org.netbeans.modules.java.editor.imports.ClipboardHandler$4$1.run(ClipboardHandler.java:216)
 at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at 
org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to