jtulach commented on a change in pull request #3715:
URL: https://github.com/apache/netbeans/pull/3715#discussion_r836049959
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java
##########
@@ -1078,6 +1086,23 @@ private static JavacTaskImpl createJavacTask(
return task;
}
+ private static String useRelease(final String requestedSource,
com.sun.tools.javac.code.Source validatedSourceLevel) {
+ if (requestedSource == null || validatedSourceLevel == null) {
+ return null;
+ }
+ com.sun.tools.javac.code.Source sourceLevel =
com.sun.tools.javac.code.Source.lookup(requestedSource);
+ if (sourceLevel == null) {
Review comment:
Working with OpenJDK sources out of the box is an important use-case for
NetBeans. By creating the `useRelease` method and adding this `sourceLevel ==
null` check I am able to open `java.base` from
https://github.com/openjdk/jdk/commit/c2c0cb2a4372d78658326461562363de9a1a194f
without major errors.
--
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