mbien commented on a change in pull request #3396:
URL: https://github.com/apache/netbeans/pull/3396#discussion_r778179211
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java
##########
@@ -1395,15 +1393,12 @@ private static File dumpHeap(@NonNull final String
path) {
private static Pair<Object,Method> heapDumper;
private static String computeJavacVersion() {
- if (NoJavacHelper.hasNbJavac()) {
- File nbJavac =
InstalledFileLocator.getDefault().locate("modules/ext/nb-javac-impl.jar",
"org.netbeans.modules.nbjavac.impl", false);
- if (nbJavac != null) {
- return String.valueOf(nbJavac.lastModified());
+ for (ModuleInfo mi : Lookup.getDefault().lookupAll(ModuleInfo.class)) {
+ if ("org.netbeans.libs.nbjavacapi".equals(mi.getCodeNameBase())) {
+ return mi.getSpecificationVersion().toString();
}
- return "-1";
- } else {
- return System.getProperty("java.vm.version", "unknown");
}
+ return System.getProperty("java.version", "unknown");
}
Review comment:
tests are green without the module lookup.
--
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