diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index d5d174ea..a5b5fd99 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -258,7 +258,8 @@ private PostBuildTransformConf(BlockConfigEntry block, Path coredir) { } } - public static void main(String... args) throws Throwable { + @SuppressWarnings("resource") + public static void main(String... args) throws Throwable { JVMHelper.checkStackTrace(LaunchServer.class); JVMHelper.verifySystemProperties(LaunchServer.class, true); LogHelper.addOutput(IOHelper.WORKING_DIR.resolve("LaunchServer.log")); @@ -268,9 +269,7 @@ public static void main(String... args) throws Throwable { // Start LaunchServer Instant start = Instant.now(); try { - try (LaunchServer lsrv = new LaunchServer(IOHelper.WORKING_DIR)) { - lsrv.run(); - } + new LaunchServer(IOHelper.WORKING_DIR).run(); } catch (Throwable exc) { LogHelper.error(exc); return;