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

Eliminating message Constructors in Exceptions to avoid misuse

    XMLWordPrintableJSON

Details

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

    Description

      Please Consider marking the constructors from Exceptions that follow the format:

      {{public FooException(final String message) { super(message) }}}

       as private or removing them altogether from the Following classes:

      AlreadySelectedException

      MissingArgumentException

      MissingOptionException

      UnrecognisedOptionException

      As they are only used within respective class and do not initialize the member fields. If a library uses the above constructors, then projects that depend on the library will get null values for members if the exceptions are caught, which should be avoided

      Attachments

        Activity

          People

            Unassigned Unassigned
            HuM4NoiD Jugal Mistry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: