commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LANG-838) ArrayUtils removeElements methods clone temporary index arrays unnecessarily
Date Fri, 28 Sep 2012 23:35:07 GMT

     [ https://issues.apache.org/jira/browse/LANG-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved LANG-838.
-----------------------

       Resolution: Fixed
    Fix Version/s: 3.2

URL: http://svn.apache.org/viewvc?rev=1391695&view=rev
Log:
LANG-838 ArrayUtils removeElements methods clone temporary index arrays unnecessarily

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java

                
> ArrayUtils removeElements methods clone temporary index arrays unnecessarily
> ----------------------------------------------------------------------------
>
>                 Key: LANG-838
>                 URL: https://issues.apache.org/jira/browse/LANG-838
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Sebb
>            Assignee: Sebb
>            Priority: Minor
>             Fix For: 3.2
>
>
> The private method removeAll(Object array, int... indices) sorts the indices array, so
arrays passed in by application code need to be cloned first.
> However, where the index array is generated locally, that is unnecessary.
> The removeElements() methods currently call the public removeAll(<type>[] array,
int... indices) methods, which clone the indices before calling the private removeAll() method.
> The removeElements() methods should call the private method directly, avoiding the unnecessary
clone call.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message