You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/09/30 18:03:53 UTC

[GitHub] geertjanw closed pull request #929: Two fixes, one to let platform/netbinox tests pass, other to silence …

geertjanw closed pull request #929: Two fixes, one to let platform/netbinox tests pass, other to silence …
URL: https://github.com/apache/incubator-netbeans/pull/929
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java
index 8cf40af85f..7e61d21203 100644
--- a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java
+++ b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java
@@ -1310,7 +1310,7 @@ private static File dumpHeap(@NonNull final String path) {
 
     private static String computeJavacVersion() {
         if (NoJavacHelper.hasNbJavac()) {
-            File nbJavac = InstalledFileLocator.getDefault().locate("modules/ext/nb-javac-impl.jar", null, false);
+            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());
             }
diff --git a/java/java.source/src/org/netbeans/modules/java/source/JBrowseModule.java b/java/java.source/src/org/netbeans/modules/java/source/JBrowseModule.java
index a1af8bd438..c40c077e84 100644
--- a/java/java.source/src/org/netbeans/modules/java/source/JBrowseModule.java
+++ b/java/java.source/src/org/netbeans/modules/java/source/JBrowseModule.java
@@ -20,6 +20,8 @@
 package org.netbeans.modules.java.source;
 
 import java.awt.Dialog;
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.prefs.Preferences;
@@ -69,6 +71,11 @@ public JBrowseModule() {
     public void restored() {
         WindowManager.getDefault().invokeWhenUIReady(() -> {
             WindowManager.getDefault().invokeWhenUIReady(() -> {
+                if (GraphicsEnvironment.isHeadless()) {
+                    //no UI, ignore (let's assume whoever run in this mode know
+                    //what they are doing)
+                    return;
+                }
                 Preferences prefs = NbPreferences.forModule(NoJavacHelper.class);
                 if (!NoJavacHelper.hasWorkingJavac() && !prefs.getBoolean(KEY_WARNING_SHOWN, false)) {
                     String install = Bundle.BN_Install();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists