@@ -34,7 +34,8 @@ public class Jasmin2JarCmd extends BaseCmd implements Opcodes {
34
34
private boolean forceOverwrite = false ;
35
35
36
36
@ Opt (opt = "o" , longOpt = "output" , description = "output .jar file, default is "
37
- + "$current_dir/[jar-name]-jasmin2jar.jar" , argName = "out-jar-file" )
37
+ + "$current_dir/[jar-name]-jasmin2jar.jar" ,
38
+ argName = "out-jar-file" )
38
39
private Path output ;
39
40
40
41
@ Opt (opt = "e" , longOpt = "encoding" , description = "encoding for .j files, default is UTF-8" , argName = "enc" )
@@ -46,7 +47,8 @@ public class Jasmin2JarCmd extends BaseCmd implements Opcodes {
46
47
@ Opt (longOpt = "no-compute-max" , description = "" , hasArg = false )
47
48
private boolean noComputeMax ;
48
49
49
- @ Opt (opt = "cv" , longOpt = "class-version" , description = "default .class version, [1~21], default 8 for JAVA8" )
50
+ @ Opt (opt = "cv" , longOpt = "class-version" , description = "default .class version, [1~" +
51
+ Constants .MAX_JAVA_VERSION + "], default 8 for JAVA8" )
50
52
private int classVersion = 8 ;
51
53
52
54
public Jasmin2JarCmd () {
@@ -62,9 +64,9 @@ protected void doCommandLine() throws Exception {
62
64
usage ();
63
65
return ;
64
66
}
65
- int maxClassVersion = Constants .JAVA_VERSIONS . length - 1 ;
66
- if ( classVersion < 1 || classVersion > maxClassVersion ) {
67
- throw new HelpException ( "-cv,--class-version out of range, 1-" + maxClassVersion + " is supported." );
67
+ if ( classVersion < 1 || classVersion > Constants .MAX_JAVA_VERSION ) {
68
+ throw new HelpException ( "-cv,--class-version out of range, 1-" + Constants . MAX_JAVA_VERSION +
69
+ " is supported." );
68
70
}
69
71
70
72
Path jar = new File (remainingArgs [0 ]).toPath ().toAbsolutePath ();
0 commit comments