Skip to content

Commit 2ac04d4

Browse files
committed
Fix NPE when SplashScreen::update is consumer
The update method in question accepts a small-D double, not a big-D Double, so passing null to it is a no-no.
1 parent 189fdc4 commit 2ac04d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/scijava/launcher/Java.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public static void upgrade(BiConsumer<String, Double> subscriber)
279279
throw new IOException("Invalid Java root directory");
280280
}
281281

282-
subscriber.accept("Updating Java...", null);
282+
subscriber.accept("Updating Java...", Double.NaN);
283283

284284
// Download the mapping of platforms to Java download links.
285285
String javaLinks = sysProp("scijava.app.java-links");
@@ -316,7 +316,7 @@ public static void upgrade(BiConsumer<String, Double> subscriber)
316316
// This is only a heuristic, but it works for most Java archives.
317317
if (s != null && dir[0] == null && s.endsWith("/")) dir[0] = s;
318318
// Forward the message on to our upgrade subscriber.
319-
subscriber.accept("Unpacking " + s, null);
319+
subscriber.accept("Unpacking " + s, Double.NaN);
320320
}));
321321

322322
// Write new installation location into the requested configuration file.
@@ -329,7 +329,7 @@ public static void upgrade(BiConsumer<String, Double> subscriber)
329329
}
330330
}
331331

332-
subscriber.accept("Java update complete", null);
332+
subscriber.accept("Java update complete", Double.NaN);
333333
}
334334

335335
private static String sysProp(String key) {

0 commit comments

Comments
 (0)