Skip to content

Commit 5f0dc62

Browse files
committed
Remove use of redundant String.substring() parameter.
1 parent 66cc7b4 commit 5f0dc62

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/main/java/org/apache/commons/cli

src/main/java/org/apache/commons/cli/Util.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ static String stripLeadingHyphens(final String str)
3838
}
3939
if (str.startsWith("--"))
4040
{
41-
return str.substring(2, str.length());
41+
return str.substring(2);
4242
}
4343
else if (str.startsWith("-"))
4444
{
45-
return str.substring(1, str.length());
45+
return str.substring(1);
4646
}
4747

4848
return str;

0 commit comments

Comments
 (0)