lahodaj commented on code in PR #6694:
URL: https://github.com/apache/netbeans/pull/6694#discussion_r1448929640
##########
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:
IIRC this was an attempt to avoid unnecessary parsing from source when none
of the OpenJDK project is open and hence not indexed. There's probably nothing
better we could do for JDK 8.
--
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