Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0942918D56 for ; Sat, 24 Oct 2015 13:42:29 +0000 (UTC) Received: (qmail 79014 invoked by uid 500); 24 Oct 2015 13:42:28 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 78777 invoked by uid 500); 24 Oct 2015 13:42:28 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 78756 invoked by uid 99); 24 Oct 2015 13:42:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2015 13:42:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 00BF62C14F3 for ; Sat, 24 Oct 2015 13:42:28 +0000 (UTC) Date: Sat, 24 Oct 2015 13:42:28 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LANG-1178) ArrayUtils.removeAll(Object array, int... indices) should do the clone, not its callers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Sebb created LANG-1178: -------------------------- Summary: ArrayUtils.removeAll(Object array, int... indices) should do the clone, not its callers Key: LANG-1178 URL: https://issues.apache.org/jira/browse/LANG-1178 Project: Commons Lang Issue Type: Bug Reporter: Sebb The method ArrayUtils.removeAll(Object array, int... indices) currently sorts the input indices array. Therefore the array needs to be cloned; this is currently done by the callers. However the sort is an implementation detail of the method, so should be done by the method itself, not by the callers, which is fragile (easy to overlook when creating a new method) and unnecessary. This would also allow the method to be more easily changed to a different implementation that does not need to sort the array (e.g. using BitSet) -- This message was sent by Atlassian JIRA (v6.3.4#6332)