Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8119B106FD for ; Sun, 12 Jan 2014 19:16:49 +0000 (UTC) Received: (qmail 62801 invoked by uid 500); 12 Jan 2014 19:16:45 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 62501 invoked by uid 500); 12 Jan 2014 19:16:44 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 62494 invoked by uid 99); 12 Jan 2014 19:16:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jan 2014 19:16:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jan 2014 19:16:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8F06E23888E2; Sun, 12 Jan 2014 19:16:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1557602 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java Date: Sun, 12 Jan 2014 19:16:20 -0000 To: commits@commons.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140112191620.8F06E23888E2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Sun Jan 12 19:16:20 2014 New Revision: 1557602 URL: http://svn.apache.org/r1557602 Log: Reduce FindBugs warnings Take defensive copies of client provided arrays Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java?rev=1557602&r1=1557601&r2=1557602&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java (original) +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java Sun Jan 12 19:16:20 2014 @@ -64,7 +64,7 @@ public class PStmtKeyCPDS extends PStmtK public PStmtKeyCPDS(String sql, int columnIndexes[]) { super(sql); - _columnIndexes = columnIndexes; + _columnIndexes = Arrays.copyOf(columnIndexes, columnIndexes.length); _autoGeneratedKeys = null; _resultSetHoldability = null; _columnNames = null; @@ -72,7 +72,7 @@ public class PStmtKeyCPDS extends PStmtK public PStmtKeyCPDS(String sql, String columnNames[]) { super(sql); - _columnNames = columnNames; + _columnNames = Arrays.copyOf(columnNames, columnNames.length); _autoGeneratedKeys = null; _resultSetHoldability = null; _columnIndexes = null;