Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-297

Required argument empty checking not working with equals specified long option

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4
    • None
    • CLI-1.x
    • None
    • OS: macOS 10.14.6

      Java: Corretto-8.212.04.2 (build 1.8.0_212-b04)

    Description

      When an option taking an argument is specified with a space the blank checking works:

      $ CheckEmpty --widget-count
      org.apache.commons.cli.MissingArgumentException: Missing argument for option: widget-count
      

       However when using the equals sign as a separator that checking does not seem to apply

      $ CheckEmpty --widget-count=
      Received widget count of:
      

      I'd expect it to throw an exception just like the space separated variety.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ftclausen Friedrich Clausen

            Dates

              Created:
              Updated:

              Slack

                Issue deployment