mkhramov created NETBEANS-4788:
----------------------------------

             Summary: NPE on editing code out of gradle project scope
                 Key: NETBEANS-4788
                 URL: https://issues.apache.org/jira/browse/NETBEANS-4788
             Project: NetBeans
          Issue Type: Bug
          Components: projects - Gradle
         Environment: Product Version: Apache NetBeans IDE DEV (Build 
dev-12d0e2d43f10e70cdc90c26e3b65d0aa946282e3)
Java: 13.0.1; Java HotSpot(TM) 64-Bit Server VM 13.0.1+9
            Reporter: mkhramov
            Assignee: Laszlo Kishalmi


Steps to reproduce:

Open gradle project

Perform some Usages search in project so Usages View is opened with some 
contents

Close project (all opened classes are closed)

Now open file from usages View and try to edit it

the NPE is thrown:

java.lang.NullPointerException
 at 
org.netbeans.modules.gradle.java.queries.GradleCompilerOptionsQuery.getOptions(GradleCompilerOptionsQuery.java:68)
 at 
org.netbeans.modules.java.project.ProjectCompilerOptionsQueryImplementation.lambda$getOptions$1(ProjectCompilerOptionsQueryImplementation.java:38)
 at java.base/java.util.Optional.map(Optional.java:258)
 at 
org.netbeans.modules.java.project.ProjectCompilerOptionsQueryImplementation.getOptions(ProjectCompilerOptionsQueryImplementation.java:38)
 at 
org.netbeans.api.java.queries.CompilerOptionsQuery.getOptions(CompilerOptionsQuery.java:58)
 at 
org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:795)
 at 
org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:409)
 at 
org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:391)
 at 
org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:492)
 at 
org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:145)
 at 
org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
 at 
org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:239)
 at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
 at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
 at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
[catch] at 
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
 at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 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)
 at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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