From 84e5f91fdf2fb22b1fb6425d0de92ce36a569854 Mon Sep 17 00:00:00 2001 From: Gravit <gravit.min@ya.ru> Date: Sun, 10 Mar 2019 19:01:14 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=94=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=BF=D0=BE=D0=BD=D1=8F=D1=82?= =?UTF-8?q?=D0=BD=D0=BE=D0=B9=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/gravit/launchserver/LaunchServer.java | 4 ++++ .../launchserver/auth/MySQLSourceConfig.java | 4 ++-- .../gravit/launcher/ClientLauncherWrapper.java | 4 ++-- .../launcher/profiles/ClientProfile.java | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 6a7d1b76..7d300b5a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -165,6 +165,10 @@ public void verify() { if (env == null) { throw new NullPointerException("Env must not be null"); } + if(netty == null) + { + throw new NullPointerException("Netty must not be null"); + } } } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java index 95c16c79..fccb3b40 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java @@ -89,9 +89,9 @@ public synchronized Connection getConnection() throws SQLException { // Set HikariCP pool // Replace source with hds source = new HikariDataSource(cfg); - LogHelper.info("HikariCP pooling enabled for '%s'", poolName); + LogHelper.warning("HikariCP pooling enabled for '%s'", poolName); } catch (ClassNotFoundException ignored) { - LogHelper.warning("HikariCP isn't in classpath for '%s'", poolName); + LogHelper.debug("HikariCP isn't in classpath for '%s'", poolName); } } return source.getConnection(); diff --git a/Launcher/src/main/java/ru/gravit/launcher/ClientLauncherWrapper.java b/Launcher/src/main/java/ru/gravit/launcher/ClientLauncherWrapper.java index 3f86f331..3c2d9df1 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/ClientLauncherWrapper.java +++ b/Launcher/src/main/java/ru/gravit/launcher/ClientLauncherWrapper.java @@ -44,9 +44,9 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep if (!process.isAlive()) { int errorcode = process.exitValue(); if (errorcode != 0) - LogHelper.error("Process exitwith error code: %d", errorcode); + LogHelper.error("Process exit with error code: %d", errorcode); else - LogHelper.info("Process exitwith code 0"); + LogHelper.info("Process exit with code 0"); } else { LogHelper.debug("Process started success"); } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java index 8de9245a..9d533337 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java @@ -391,6 +391,24 @@ public void verify() { // Client launcher VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Main class can't be empty"); + for(String s : classPath) + { + if(s == null) throw new IllegalArgumentException("Found null entry in classPath"); + } + for(String s : jvmArgs) + { + if(s == null) throw new IllegalArgumentException("Found null entry in jvmArgs"); + } + for(String s : clientArgs) + { + if(s == null) throw new IllegalArgumentException("Found null entry in clientArgs"); + } + for(OptionalFile f : updateOptional) + { + if(f == null) throw new IllegalArgumentException("Found null entry in updateOptional"); + if(f.name == null) throw new IllegalArgumentException("Optional: name must not be null"); + if(f.list == null) throw new IllegalArgumentException("Optional: list must not be null"); + } } @Override