From 85c19854356e24ed78a1da4721c3c08667c9aaf2 Mon Sep 17 00:00:00 2001 From: Gravit Date: Tue, 16 Jul 2019 04:28:19 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=97=D0=B0=D1=89=D0=B8=D1=82=D0=B0=20?= =?UTF-8?q?=D0=BE=D1=82=20=D0=B4=D1=83=D1=80=D0=B0=D0=BA=D0=B0=20-=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D0=BD=D0=B0?= =?UTF-8?q?=20null=20update*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launcher/profiles/ClientProfile.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java index 4762efb5..b47f527d 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java @@ -14,6 +14,7 @@ import pro.gravit.launcher.LauncherAPI; import pro.gravit.launcher.hasher.FileNameMatcher; import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.profiles.optional.OptionalDepend; import pro.gravit.launcher.profiles.optional.OptionalFile; import pro.gravit.launcher.profiles.optional.OptionalType; import pro.gravit.utils.helper.IOHelper; @@ -402,6 +403,16 @@ public void verify() { // Client launcher VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Main class can't be empty"); + for (String s : update) { + if (s == null) throw new IllegalArgumentException("Found null entry in update"); + } + for (String s : updateVerify) { + if (s == null) throw new IllegalArgumentException("Found null entry in updateVerify"); + } + for (String s : updateExclusions) { + if (s == null) throw new IllegalArgumentException("Found null entry in updateExclusions"); + } + for (String s : classPath) { if (s == null) throw new IllegalArgumentException("Found null entry in classPath"); } @@ -415,6 +426,15 @@ public void verify() { 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"); + for (String s : f.list) { + if (s == null) throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.list", f.name)); + } + if(f.conflictFile != null) for (OptionalDepend s : f.conflictFile) { + if (s == null) throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.conflictFile", f.name)); + } + if(f.dependenciesFile != null) for (OptionalDepend s : f.dependenciesFile) { + if (s == null) throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.dependenciesFile", f.name)); + } } }