New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI-313: adding new test to properly handling negative case of invali… #95
base: master
Are you sure you want to change the base?
Conversation
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use String#isEmpty and flip the ternary. A space is missing around the "?". Add a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping?
I'm starting to resume the work as I've been not feeling well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. Ping.
@@ -18,9 +18,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more | |||
package org.apache.commons.cli; | |||
|
|||
import static org.junit.Assert.assertEquals; | |||
import static org.junit.Assert.assertThrows; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These imports are added but not used?
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping?
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
=========================================
Coverage ? 93.12%
Complexity ? 569
=========================================
Files ? 21
Lines ? 1207
Branches ? 215
=========================================
Hits ? 1124
Misses ? 46
Partials ? 37 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I think this is now superseeded by PR #186 and thus can be closed without merging. |
@hungklu |
…d argument input