jlahoda commented on a change in pull request #3396:
URL: https://github.com/apache/netbeans/pull/3396#discussion_r778477644



##########
File path: 
java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java
##########
@@ -1395,15 +1394,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());
-            }
-            return "-1";
-        } else {
-            return System.getProperty("java.vm.version", "unknown");
-        }
+//        for (ModuleInfo mi : 
Lookup.getDefault().lookupAll(ModuleInfo.class)) {
+//            if ("org.netbeans.libs.nbjavacapi".equals(mi.getCodeNameBase())) 
{
+//                return mi.getSpecificationVersion().toString();
+//            }
+//        }
+        return SourceVersion.latest().toString();

Review comment:
       I like this, good idea. The commented out code could be simply removed.

##########
File path: 
java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java
##########
@@ -1452,6 +1452,7 @@ protected JCExpression checkExprStat(JCExpression t) {
             return super.checkExprStat(t);
         }
 
+/*  TODO: unused? called a method which is only available from 8-11.
         protected JCCase switchBlockStatementGroupImpl() throws Throwable {

Review comment:
       Yes, I think so.

##########
File path: 
java/java.source.base/test/unit/src/org/netbeans/modules/java/source/indexing/VanillaCompileWorkerTest.java
##########
@@ -1958,13 +1958,7 @@ protected void tearDown() throws Exception {
     }
 
     public static Test suite() {
-        if (NoJavacHelper.hasNbJavac()) {
-            return new VanillaCompileWorkerTest("noop");
-        } else {
-//            return new VanillaCompileWorkerTest("testAnonymousClasses");
-//            return new 
VanillaCompileWorkerTest("testPreserveValidInitializers");
-            return new NbTestSuite(VanillaCompileWorkerTest.class);
-        }
+        return new VanillaCompileWorkerTest("noop");

Review comment:
       Sorry, but the other branch should be preserved:
   ```
   return new NbTestSuite(VanillaCompileWorkerTest.class);
   ```
   
   Or simply remove the `suite` method, as this should be the default.
   
   The intent here was to not run the test with the old nb-javac, but the new 
one is basiclly a javac from the JDK, so the test should run.




-- 
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