mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
provide name for anonymous threads to make stacktraces easier to read
This commit is contained in:
@@ -49,7 +49,7 @@ class LightTestMigration {
|
||||
private static LightTestMigration ourPrevious;
|
||||
|
||||
static {
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(LightTestMigration::flush));
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(LightTestMigration::flush, "LightTestMigration flusher"));
|
||||
}
|
||||
|
||||
private Path myBaseDir;
|
||||
|
||||
@@ -152,7 +152,7 @@ class RetypeSession(
|
||||
|
||||
var retypePaused: Boolean = false
|
||||
|
||||
private val timerThread = Thread(::runLoop)
|
||||
private val timerThread = Thread(::runLoop, "RetypeSession loop")
|
||||
private var stopTimer = false
|
||||
|
||||
init {
|
||||
|
||||
@@ -171,7 +171,7 @@ public class GlobalMenuLinux implements GlobalMenuLib.EventHandler, Disposable {
|
||||
PlatformImpl.startup(()->ourLib.startWatchDbus(ourGLogger, ourOnAppmenuServiceAppeared, ourOnAppmenuServiceVanished));
|
||||
} catch (Throwable e) {
|
||||
LOG.info("can't start main loop via javaFX (will run it manualy): " + e.getMessage());
|
||||
final Thread glibMain = new Thread(()->ourLib.runMainLoop(ourGLogger, ourOnAppmenuServiceAppeared, ourOnAppmenuServiceVanished));
|
||||
final Thread glibMain = new Thread(()->ourLib.runMainLoop(ourGLogger, ourOnAppmenuServiceAppeared, ourOnAppmenuServiceVanished), "GlobalMenuLinux loop");
|
||||
glibMain.start();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -101,7 +101,7 @@ public class GradleAttachSourcesProvider implements AttachSourcesProvider {
|
||||
try {
|
||||
sourcesLocationFile = new File(FileUtil.createTempDirectory("sources", "loc"), "path.tmp");
|
||||
sourcesLocationFilePath = StringUtil.escapeBackSlashes(sourcesLocationFile.getCanonicalPath());
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> FileUtil.delete(sourcesLocationFile)));
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> FileUtil.delete(sourcesLocationFile), "GradleAttachSourcesProvider cleanup"));
|
||||
}
|
||||
catch (IOException e) {
|
||||
GradleLog.LOG.warn(e);
|
||||
|
||||
+1
-1
@@ -260,7 +260,7 @@ public class GradleExecutionHelper {
|
||||
final File scriptFile = new File(wrapperFilesLocation, "gradlew");
|
||||
final File pathToProperties = new File(wrapperFilesLocation, "path.tmp");
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> FileUtil.delete(wrapperFilesLocation)));
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> FileUtil.delete(wrapperFilesLocation), "GradleExecutionHelper cleanup"));
|
||||
final String[] lines = {
|
||||
"",
|
||||
"gradle.projectsEvaluated { gr ->",
|
||||
|
||||
Reference in New Issue
Block a user