You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/04/26 18:52:20 UTC
svn commit: r1330960 -
/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java
Author: sebb
Date: Thu Apr 26 16:52:20 2012
New Revision: 1330960
URL: http://svn.apache.org/viewvc?rev=1330960&view=rev
Log:
Make private immutable fields final
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=1330960&r1=1330959&r2=1330960&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 Thu Apr 26 16:52:20 2012
@@ -24,38 +24,58 @@ import org.apache.commons.dbcp2.PStmtKey
* A key uniquely identifying a {@link java.sql.PreparedStatement PreparedStatement}.
*/
public class PStmtKeyCPDS extends PStmtKey {
- private Integer _autoGeneratedKeys = null;
- private Integer _resultSetHoldability = null;
- private int _columnIndexes[] = null;
- private String _columnNames[] = null;
+ private final Integer _autoGeneratedKeys;
+ private final Integer _resultSetHoldability;
+ private final int _columnIndexes[];
+ private final String _columnNames[];
public PStmtKeyCPDS(String sql) {
super(sql);
+ _autoGeneratedKeys = null;
+ _resultSetHoldability = null;
+ _columnIndexes = null;
+ _columnNames = null;
}
public PStmtKeyCPDS(String sql, int autoGeneratedKeys) {
super(sql);
_autoGeneratedKeys = new Integer(autoGeneratedKeys);
+ _resultSetHoldability = null;
+ _columnIndexes = null;
+ _columnNames = null;
}
public PStmtKeyCPDS(String sql, int resultSetType, int resultSetConcurrency) {
super(sql, resultSetType, resultSetConcurrency);
+ _autoGeneratedKeys = null;
+ _resultSetHoldability = null;
+ _columnIndexes = null;
+ _columnNames = null;
}
public PStmtKeyCPDS(String sql, int resultSetType, int resultSetConcurrency,
int resultSetHoldability) {
super(sql, resultSetType, resultSetConcurrency);
_resultSetHoldability = new Integer(resultSetHoldability);
+ _autoGeneratedKeys = null;
+ _columnIndexes = null;
+ _columnNames = null;
}
public PStmtKeyCPDS(String sql, int columnIndexes[]) {
super(sql);
_columnIndexes = columnIndexes;
+ _autoGeneratedKeys = null;
+ _resultSetHoldability = null;
+ _columnNames = null;
}
public PStmtKeyCPDS(String sql, String columnNames[]) {
super(sql);
_columnNames = columnNames;
+ _autoGeneratedKeys = null;
+ _resultSetHoldability = null;
+ _columnIndexes = null;
}