commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-1243) Simplify ArrayUtils removeElements by using new decrementAndGet() method
Date Thu, 02 Jun 2016 10:55:59 GMT
Sebb created LANG-1243:
--------------------------

             Summary: Simplify ArrayUtils removeElements by using new decrementAndGet() method
                 Key: LANG-1243
                 URL: https://issues.apache.org/jira/browse/LANG-1243
             Project: Commons Lang
          Issue Type: Improvement
            Reporter: Sebb


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

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

as follows

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




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message