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

Simplify ArrayUtils removeElements by using new decrementAndGet() method

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.5
    • Component/s: None
    • Labels:
      None

      Description

      As the subject says - the new decrementAndGet() method can be used to simplify the following sequence:

                      count.decrement();
                      if (count.intValue() == 0) {
      

      as follows

                      if (count.decrementAndGet() == 0) {
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment