diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java index 9cf0a3e66..497ca9c2e 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java @@ -41,7 +41,12 @@ public void execute(List classNodeList) { //prompt dialog for version number // TODO: include a little diagram of what JDK is which number - int newVersion = Integer.parseInt(BytecodeViewer.showInput("Class Version Number: (52 = JDK 8)")); + String input = BytecodeViewer.showInput("Class Version Number: (52 = JDK 8)"); + + if(input == null) + return; + + int newVersion = Integer.parseInt(input); //update the ClassFile version classNodeList.forEach(classNode -> classNode.version = newVersion);