Skip to content

Commit

Permalink
Remove extra null check, not technically needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Feb 9, 2021
1 parent ad1b4d6 commit 860d85a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,9 @@ public void updateView() {
// SUPPLIER: Fetch decompiled code
String decompilerPrefix = (controller.config().decompile().showName ?
"// Decompiled with: " + decompiler.getNameAndVersion() + "\n" : "");
String classVersionPrefix = "";
byte[] clazz = controller.getWorkspace().getRawClass(path);
if (clazz != null) {
int version = ClassUtil.getVersion(clazz) - ClassUtil.VERSION_OFFSET;
classVersionPrefix = "// Class Version: " + version + "\n";
}
int version = ClassUtil.getVersion(clazz) - ClassUtil.VERSION_OFFSET;
String classVersionPrefix = "// Class Version: " + version + "\n";
String decompile = decompilerPrefix + classVersionPrefix +
decompiler.create(controller).decompile(path);
return EscapeUtil.unescapeUnicode(decompile);
Expand Down

0 comments on commit 860d85a

Please sign in to comment.