Skip to content

Commit

Permalink
Two fixes, one to let platform/netbinox tests pass, other to silence …
Browse files Browse the repository at this point in the history
…useless warning from InstalledFileLocator.
  • Loading branch information
jlahoda committed Sep 30, 2018
1 parent c02a2a5 commit db8aaa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit db8aaa9

Please sign in to comment.