You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/05/07 02:18:54 UTC

[GitHub] [commons-cli] hungklu commented on a diff in pull request #95: CLI-313: adding new test to properly handling negative case of invali…

hungklu commented on code in PR #95:
URL: https://github.com/apache/commons-cli/pull/95#discussion_r867289570


##########
src/main/java/org/apache/commons/cli/DefaultParser.java:
##########
@@ -580,7 +580,7 @@ private boolean isArgument(final String token) {
      * Tests if the specified token is a Java-like property (-Dkey=value).
      */
     private boolean isJavaProperty(final String token) {
-        final String opt = token.substring(0, 1);
+        final String opt = token.length() > 0? token.substring(0, 1): null;

Review Comment:
   I'm starting to resume the work as I've been not feeling well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org