Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hungklu
Copy link

@hungklu hungklu commented Mar 7, 2022

…d argument input

@@ -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;
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping?

Copy link
Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping?

Copy link
Member

@garydgregory garydgregory left a 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;
Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping?

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@256502f). Click here to learn what that means.
The diff coverage is n/a.

@@            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

@centic9
Copy link
Member

centic9 commented Aug 22, 2023

I think this is now superseeded by PR #186 and thus can be closed without merging.

@garydgregory
Copy link
Member

@hungklu
Please fix your build or close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants