Skip to content

Commit

Permalink
Fix NPEs
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Apr 20, 2023
1 parent 740460d commit cbf962f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/matcher/PluginLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void run(String[] args) {
for (int i = 0; i < args.length; i++) {
switch (args[i]) {
case "--additional-plugins":
while (!args[i+1].startsWith("--")) {
while (i+1 < args.length && !args[i+1].startsWith("--")) {
pluginPaths.add(Path.of(args[++i]));
}

Expand Down
10 changes: 5 additions & 5 deletions src/matcher/gui/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,35 +135,35 @@ private void handleStartupArgs(List<String> args) {
// ProjectConfig args

case "--inputs-a":
while (!args.get(i+1).startsWith("--")) {
while (i+1 < args.size() && !args.get(i+1).startsWith("--")) {
inputsA.add(Path.of(args.get(++i)));
validProjectConfigArgPresent = true;
}

break;
case "--inputs-b":
while (!args.get(i+1).startsWith("--")) {
while (i+1 < args.size() && !args.get(i+1).startsWith("--")) {
inputsB.add(Path.of(args.get(++i)));
validProjectConfigArgPresent = true;
}

break;
case "--classpath-a":
while (!args.get(i+1).startsWith("--")) {
while (i+1 < args.size() && !args.get(i+1).startsWith("--")) {
classPathA.add(Path.of(args.get(++i)));
validProjectConfigArgPresent = true;
}

break;
case "--classpath-b":
while (!args.get(i+1).startsWith("--")) {
while (i+1 < args.size() && !args.get(i+1).startsWith("--")) {
classPathB.add(Path.of(args.get(++i)));
validProjectConfigArgPresent = true;
}

break;
case "--shared-classpath":
while (!args.get(i+1).startsWith("--")) {
while (i+1 < args.size() && !args.get(i+1).startsWith("--")) {
sharedClassPath.add(Path.of(args.get(++i)));
validProjectConfigArgPresent = true;
}
Expand Down

0 comments on commit cbf962f

Please sign in to comment.