From ec53c74aaa890c8e1680cbecb894ad4a2c32fd90 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 23 Aug 2019 22:17:40 +0100 Subject: [PATCH] Replace if with string switch --- .../main/java/dev/openrs2/decompiler/Decompiler.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/decompiler/src/main/java/dev/openrs2/decompiler/Decompiler.java b/decompiler/src/main/java/dev/openrs2/decompiler/Decompiler.java index 37c9999942..eb1efc3f13 100644 --- a/decompiler/src/main/java/dev/openrs2/decompiler/Decompiler.java +++ b/decompiler/src/main/java/dev/openrs2/decompiler/Decompiler.java @@ -20,12 +20,16 @@ public final class Decompiler implements Closeable { private static Path getDestination(String archive) { archive = archive.replaceAll("(?:_gl)?[.]jar$", ""); - if (archive.equals("runescape")) { + switch (archive) { + case "runescape": archive = "client"; - } else if (archive.equals("jaggl")) { + break; + case "jaggl": archive = "gl"; - } else if (archive.equals("jaggl_dri")) { + break; + case "jaggl_dri": archive = "gl-dri"; + break; } return Paths.get("nonfree").resolve(archive).resolve("src/main/java"); }