Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-922

Add isOneTrue(booleans...) to BooleanUtils to preserve old behavior of BooleanUtils.xor(booleans...)

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • lang.*
    • None

    Description

      The old implementation (prior to r1532476) of BooleanUtils.xor(boolean...) checked if the provided array contained exactly one boolean with value true. This was changed because it is not the correct behavior for an XOR operation. To preserve the behavior we should add BooleanUtils.isOneTrue(boolean...) and BooleanUtils.isOneTrue(Boolean...) (and possibly the equivalents for isOneFalse).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              britter Benedikt Ritter
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: