snreinert commented on code in PR #6694:
URL: https://github.com/apache/netbeans/pull/6694#discussion_r1393405019


##########
java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/ClassPathProviderImpl.java:
##########
@@ -203,7 +203,7 @@ private static URL projectDir2FakeTarget(FileObject 
projectDir) throws Malformed
     @Override
     public ClassPath findClassPath(FileObject file, String type) {
         if (sourceCP.findOwnerRoot(file) != null) {
-            if (!repository.isAnyProjectOpened()) {
+            if (repository != null && !repository.isAnyProjectOpened()) {
                 //if no project is open, java.base may not be indexed. 
Fallback on default queries:
                 return null;
             }

Review Comment:
   For openjdk 8 (and maybe prior) checkouts, the repository is null so the 
comment inside that block wouldn't apply. Would non-modular JDKs ever have a 
non-null repository?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to