mbien commented on code in PR #9697:
URL: https://github.com/apache/netbeans/pull/9697#discussion_r4256986062
##########
java/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java:
##########
@@ -874,10 +874,12 @@ static JavacTaskImpl createJavacTask(
compilerOptions = null;
sourceLevel = null;
}
- final JavacTaskImpl javacTask = createJavacTask(cpInfo,
+ String sourceLevelStr = sourceLevel != null ?
sourceLevel.getSourceLevel() : null;
+ final JavacTaskImpl javacTask = createJavacTask(
+ cpInfo,
diagnosticListener,
- sourceLevel != null ? sourceLevel.getSourceLevel() : null,
- sourceLevel != null ? sourceLevel.getProfile() : null,
+ sourceLevelStr,
+ sourceLevel != null && "1.8".equals(sourceLevelStr) ?
sourceLevel.getProfile() : null,
Review Comment:
btw: i double checked this and it normalizes source level 8 to 1.8, just
like the doc implies. Everything above 1.8 is an integers.
--
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