Remove the second parameter of substring() if possible
Closes gh-5720
This commit is contained in:
committed by
Stephane Nicoll
parent
58dac43b8d
commit
b914b4aa52
@@ -29,7 +29,7 @@ public class SampleApplication {
|
||||
throw new IllegalArgumentException("Invalid argument " + argument);
|
||||
}
|
||||
int index = args[0].indexOf("=");
|
||||
String profile = argument.substring(index + 1, argument.length());
|
||||
String profile = argument.substring(index + 1);
|
||||
System.out.println("I haz been run with profile(s) '" + profile + "'");
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SampleApplication {
|
||||
throw new IllegalArgumentException("Invalid argument " + argument);
|
||||
}
|
||||
int index = args[0].indexOf("=");
|
||||
String profile = argument.substring(index + 1, argument.length());
|
||||
String profile = argument.substring(index + 1);
|
||||
System.out.println("I haz been run with profile(s) '" + profile + "'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user