Skip to content

Commit 61abfb7

Browse files
committed
Add a Java.upgrade signature that doesn't shutdown
For the migration process we do *not* want to force a shutdown.
1 parent 31ea373 commit 61abfb7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>app-launcher</artifactId>
13-
<version>2.1.3-SNAPSHOT</version>
13+
<version>2.2.0-SNAPSHOT</version>
1414

1515
<name>SciJava App Launcher</name>
1616
<description>Launcher for SciJava applications.</description>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ public static void upgrade() {
275275
}
276276

277277
public static void upgrade(boolean headless) {
278+
upgrade(headless, true);
279+
}
280+
281+
public static void upgrade(boolean headless, boolean shutdownAfter) {
278282
if (!headless) Splash.show(false);
279283
String upgradeComplete = "<html>Java has been updated successfully.<br>" +
280284
"Please restart " + ClassLauncher.appName() + " to apply the changes.";
@@ -307,7 +311,7 @@ public static void upgrade(boolean headless) {
307311
finally {
308312
if (!headless) Splash.hide();
309313
}
310-
notifyAndShutdown(upgradeComplete, headless);
314+
if (shutdownAfter) notifyAndShutdown(upgradeComplete, headless);
311315
}
312316

313317
public static void upgrade(BiConsumer<String, Double> subscriber)

0 commit comments

Comments
 (0)