Skip to content

Commit

Permalink
Fix Change Class File Versions Plugin 'Cancel' Option
Browse files Browse the repository at this point in the history
Resolves #447
  • Loading branch information
Konloch committed Oct 2, 2024
1 parent ed7865c commit dac4cee
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ public void execute(List<ClassNode> 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);
Expand Down

0 comments on commit dac4cee

Please sign in to comment.