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

OptionBuilder is not thread-safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0, 1.1, 1.2
    • 1.3
    • CLI-1.x
    • None

    Description

      Class OptionBuilder is not thread-safe.
      It uses one OptionBuilder instance without synchronizing access to it.
      If more than one thread uses OptionBuilder, that can result in invalid Options (suppose a scheduler component).

      Don't know if this should be fixed. At least the Javadoc should mention the fact that the class is not thread-safe.
      As a workaround, use constructor of class Option.

      Attachments

        Activity

          People

            Unassigned Unassigned
            therre Thomas Herre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: