Skip to content

Commit 103c96e

Browse files
authored
Merge pull request #2277 from adamretter/hotfix/export-thread-naming-5.0.0
(5.x.x) Fix a regression in ExportGUI
2 parents 88db76b + 97e4474 commit 103c96e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/org/exist/backup/ExportGUI.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.exist.security.PermissionDeniedException;
4848

4949
import static java.nio.charset.StandardCharsets.UTF_8;
50+
import static org.exist.util.ThreadUtils.newGlobalThread;
5051
import static org.exist.util.ThreadUtils.newInstanceThread;
5152

5253

@@ -338,7 +339,11 @@ private void startBtncheck(java.awt.event.ActionEvent evt) { // GEN-FIRST:event_
338339
closeLog();
339340
}
340341
};
341-
newInstanceThread(pool, "export-gui.check-run", checkRun).start();
342+
if (pool != null) {
343+
newInstanceThread(pool, "export-gui.check-run", checkRun).start();
344+
} else {
345+
newGlobalThread("export-gui.check-run", checkRun).start();
346+
}
342347
} // GEN-LAST:event_startBtncheck
343348

344349

@@ -359,7 +364,11 @@ private void exportBtnActionPerformed(java.awt.event.ActionEvent evt) { // GEN-F
359364
closeLog();
360365
}
361366
};
362-
newInstanceThread(pool, "export-gui.export", th).start();
367+
if (pool != null) {
368+
newInstanceThread(pool, "export-gui.export", th).start();
369+
} else {
370+
newGlobalThread("export-gui.export", th).start();
371+
}
363372
} // GEN-LAST:event_exportBtnActionPerformed
364373

365374

0 commit comments

Comments
 (0)