db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1365468 [1/2] - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ client/org/apache/derby/client/net/ client/org/apache/derby/jdbc/ drda/org/apache/derby/impl/drda/
Date Wed, 25 Jul 2012 06:47:21 GMT
Author: kahatlen
Date: Wed Jul 25 06:47:20 2012
New Revision: 1365468

URL: http://svn.apache.org/viewvc?rev=1365468&view=rev
Log:
DERBY-5873: Avoid unnecessary allocation of Number instances in client/server

Replace explicit calls to constructors for java.lang.Number sub-classes and
java.lang.Boolean with valueOf() calls or with auto-boxing.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/EncryptionManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CharacterEncodings.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CodePointNameTable.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolException.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAResultSet.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DssTrace.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java Wed Jul 25 06:47:20 2012
@@ -186,18 +186,17 @@ public class Blob extends Lob implements
                 }
                 if (pos <= 0) {
                     throw new SqlException(agent_.logWriter_, 
-                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), 
-                        new Long(pos));
+                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), pos);
                 }
                 if (pos > sqlLength() + 1) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE), 
-                        new Long(pos));
+                        pos);
                 }
                 if (length < 0) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
-                        new Integer(length));
+                        length);
                 }
                 byte[] retVal = getBytesX(pos, length);
                 if (agent_.loggingEnabled()) {
@@ -290,8 +289,7 @@ public class Blob extends Lob implements
                 }
                 if (start < 1) {
                     throw new SqlException(agent_.logWriter_, 
-                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), 
-                            new Long(start));
+                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), start);
                 }
                 long pos = positionX(pattern, start);
                 if (agent_.loggingEnabled()) {
@@ -333,8 +331,7 @@ public class Blob extends Lob implements
                 }
                 if (start < 1) {
                     throw new SqlException(agent_.logWriter_, 
-                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), 
-                            new Long(start));
+                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), start);
                 }
                 long pos = positionX(pattern, start);
                 if (agent_.loggingEnabled()) {
@@ -435,7 +432,7 @@ public class Blob extends Lob implements
         
         if (pos <= 0L) {
             throw new SqlException(agent_.logWriter_,
-                    new ClientMessageId(SQLState.BLOB_BAD_POSITION), new Long(pos));
+                    new ClientMessageId(SQLState.BLOB_BAD_POSITION), pos);
         }
         
         /*
@@ -446,33 +443,29 @@ public class Blob extends Lob implements
         
         if (pos  >= Integer.MAX_VALUE) {
             throw new SqlException(agent_.logWriter_,
-                    new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE), new Long(pos));
+                    new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE), pos);
         }
         
         if (pos - 1 > sqlLength()) {
             throw new SqlException(agent_.logWriter_,
-                         new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE),
-                         new Long(pos));
+                    new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE), pos);
         }
         
         if ((offset < 0) || offset > bytes.length )
         {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_INVALID_OFFSET), 
-                new Integer(offset));
+                new ClientMessageId(SQLState.BLOB_INVALID_OFFSET), offset);
         }
         if ( len < 0 ) {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
-                new Integer(len));
+                new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), len);
         }
         if (len == 0) {
             return 0;
         }
         if (len > bytes.length - offset) {
             throw new SqlException(agent_.logWriter_,
-                    new ClientMessageId(SQLState.BLOB_LENGTH_TOO_LONG),
-                    new Integer(len));
+                    new ClientMessageId(SQLState.BLOB_LENGTH_TOO_LONG), len);
         }   
         
         final int length = Math.min((bytes.length - offset), len);
@@ -524,7 +517,7 @@ public class Blob extends Lob implements
                 if (pos < 1) {
                     throw new SqlException(agent_.logWriter_,
                             new ClientMessageId(SQLState.BLOB_BAD_POSITION),
-                            new Long(pos));
+                            pos);
                 }
                 
                 OutputStream outStream;
@@ -561,7 +554,7 @@ public class Blob extends Lob implements
                 if (len < 0 || len > sqlLength()) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                        new Long(len), "len", "Blob.truncate()");
+                        len, "len", "Blob.truncate()");
                 }
                 if (len == this.sqlLength()) {
                     return;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement.java Wed Jul 25 06:47:20 2012
@@ -1198,9 +1198,9 @@ public class CallableStatement extends P
                 //
                 if ( parameterMetaData_.types_[ i ] == Types.SMALLINT )
                 {
-                    if ( (returnArg != null) && (returnArg instanceof Integer) )
+                    if (returnArg instanceof Integer)
                     {
-                        returnArg = new Short( ((Integer) returnArg).shortValue() );
+                        returnArg = ((Integer) returnArg).shortValue();
                     }
                 }
                 
@@ -1229,7 +1229,7 @@ public class CallableStatement extends P
         if (parameterMetaData_ == null || parameterMetaData_.sqlxParmmode_[parameterIndex - 1] < java.sql.ParameterMetaData.parameterModeInOut) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.PARAM_NOT_OUT_OR_INOUT), 
-                new Integer(parameterIndex));
+                parameterIndex);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java Wed Jul 25 06:47:20 2012
@@ -274,20 +274,19 @@ public class Clob extends Lob implements
 
                 if ( pos <= 0 ) {
                     throw new SqlException(agent_.logWriter_,
-                        new ClientMessageId(SQLState.BLOB_BAD_POSITION),
-                        new Long(pos));
+                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), pos);
                 }
 
                 if ( length < 0 ) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
-                        new Integer(length));
+                        length);
                 }
 
                 if (pos > sqlLength() + 1) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE),
-                        new Long(pos));
+                        pos);
                 }
                 retVal = getSubStringX(pos, length);
 
@@ -438,7 +437,7 @@ public class Clob extends Lob implements
                 if (start < 1) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.BLOB_BAD_POSITION),
-                            new Long(start));
+                            start);
                 }
 
                 long pos = positionX(searchstr, start);
@@ -461,7 +460,7 @@ public class Clob extends Lob implements
         if (start <= 0) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Long(start), "start", "Clob.position()");
+                start, "start", "Clob.position()");
         }
 
         //Check is locator support is available for this LOB.
@@ -498,8 +497,7 @@ public class Clob extends Lob implements
                 }
                 if (start < 1) {
                     throw new SqlException(agent_.logWriter_,
-                        new ClientMessageId(SQLState.BLOB_BAD_POSITION),
-                            new Long(start));
+                        new ClientMessageId(SQLState.BLOB_BAD_POSITION), start);
                 }
 
                 if (searchstr == null) {
@@ -525,7 +523,7 @@ public class Clob extends Lob implements
         if (start <= 0) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Long(start), "start", "Clob.position()");
+                start, "start", "Clob.position()");
         }
 
         // if the searchstr is longer than the source, no match
@@ -616,13 +614,11 @@ public class Clob extends Lob implements
     public int setStringX(long pos, String str, int offset, int len) throws SqlException {
         if ((int) pos <= 0 ) {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_BAD_POSITION),
-                new Long(pos));
+                new ClientMessageId(SQLState.BLOB_BAD_POSITION), pos);
         }
         if ( pos - 1 > sqlLength()) {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE),
-                new Long(pos));
+                new ClientMessageId(SQLState.BLOB_POSITION_TOO_LARGE), pos);
         }
         
         if (str == null) {
@@ -637,21 +633,19 @@ public class Clob extends Lob implements
         
         if ((offset < 0) || offset >= str.length() ) {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_INVALID_OFFSET),
-                new Integer(offset));
+                new ClientMessageId(SQLState.BLOB_INVALID_OFFSET), offset);
         }
 
         if ( len < 0 ) {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
-                new Integer(len));
+                new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), len);
         }
         
         if (offset + len > str.length()) {
             throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(
                             SQLState.LANG_SUBSTR_START_ADDING_LEN_OUT_OF_RANGE),
-                    new Integer(offset), new Integer(len), str);
+                    offset, len, str);
         }
 
         if (len == 0) {
@@ -771,13 +765,13 @@ public class Clob extends Lob implements
                 if (len < 0 ) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
-                        new Long(len));
+                        len);
                 }
 
                 if ( len > sqlLength()) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.BLOB_LENGTH_TOO_LONG),
-                        new Long(len));
+                        len);
                 }
 
                 if (len == sqlLength()) {
@@ -1000,7 +994,7 @@ public class Clob extends Lob implements
         if (length > Integer.MAX_VALUE) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT),
-                new Long(length), new Integer(Integer.MAX_VALUE));
+                length, Integer.MAX_VALUE);
         }
 
         try {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobWriter.java Wed Jul 25 06:47:20 2012
@@ -37,8 +37,7 @@ public class ClobWriter extends java.io.
 
         if (offset_ - 1 > clob_.sqlLength()) {
             throw new SqlException(clob_.agent_.logWriter_, 
-                new ClientMessageId(SQLState.BLOB_INVALID_OFFSET),
-                new Long(offset));
+                new ClientMessageId(SQLState.BLOB_INVALID_OFFSET), offset);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java Wed Jul 25 06:47:20 2012
@@ -743,7 +743,7 @@ public class ColumnMetaData implements j
         if (column < 1 || column > columns_) {
             throw new SqlException(logWriter_, 
             		new ClientMessageId (SQLState.LANG_INVALID_COLUMN_POSITION),
-            		new Integer (column), new Integer(columns_));
+            		column, columns_);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java Wed Jul 25 06:47:20 2012
@@ -997,7 +997,7 @@ public abstract class Connection
         default:
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId (SQLState.UNIMPLEMENTED_ISOLATION_LEVEL),
-                new Integer(level));
+                level);
         }
         if (setTransactionIsolationStmt == null  ||
                 !(setTransactionIsolationStmt.openOnClient_ &&

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java Wed Jul 25 06:47:20 2012
@@ -107,19 +107,19 @@ final class CrossConverters {
             return Boolean.valueOf(source);
 
         case Types.SMALLINT:
-            return new Short(numVal);
+            return Short.valueOf(numVal);
 
         case Types.INTEGER:
-            return new Integer(numVal);
+            return Integer.valueOf(numVal);
 
         case Types.BIGINT:
-            return new Long(numVal);
+            return Long.valueOf(numVal);
 
         case Types.REAL:
-            return new Float(numVal);
+            return Float.valueOf(numVal);
 
         case Types.DOUBLE:
-            return new Double(numVal);
+            return Double.valueOf(numVal);
 
         case Types.DECIMAL:
             return java.math.BigDecimal.valueOf(numVal);
@@ -151,19 +151,19 @@ final class CrossConverters {
             return Boolean.valueOf(source != 0);
 
         case Types.SMALLINT:
-            return new Short(source);
+            return Short.valueOf(source);
 
         case Types.INTEGER:
-            return new Integer(source);
+            return Integer.valueOf(source);
 
         case Types.BIGINT:
-            return new Long(source);
+            return Long.valueOf(source);
 
         case Types.REAL:
-            return new Float(source);
+            return Float.valueOf(source);
 
         case Types.DOUBLE:
-            return new Double(source);
+            return Double.valueOf(source);
 
         case Types.DECIMAL:
             return java.math.BigDecimal.valueOf(source);
@@ -194,19 +194,19 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "SMALLINT");
             }
-            return new Short((short) source);
+            return Short.valueOf((short) source);
 
         case Types.INTEGER:
-            return new Integer(source);
+            return Integer.valueOf(source);
 
         case Types.BIGINT:
-            return new Long(source);
+            return Long.valueOf(source);
 
         case Types.REAL:
-            return new Float(source);
+            return Float.valueOf(source);
 
         case Types.DOUBLE:
-            return new Double(source);
+            return Double.valueOf(source);
 
         case Types.DECIMAL:
             return java.math.BigDecimal.valueOf(source);
@@ -289,7 +289,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "SMALLINT");
             }
-            return new Short((short) source);
+            return Short.valueOf((short) source);
 
         case Types.INTEGER:
             if (Configuration.rangeCheckCrossConverters &&
@@ -297,16 +297,16 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "INTEGER");
             }
-            return new Integer((int) source);
+            return Integer.valueOf((int) source);
 
         case Types.BIGINT:
-            return new Long(source);
+            return Long.valueOf(source);
 
         case Types.REAL:
-            return new Float(source);
+            return Float.valueOf(source);
 
         case Types.DOUBLE:
-            return new Double(source);
+            return Double.valueOf(source);
 
         case Types.DECIMAL:
             return java.math.BigDecimal.valueOf(source);
@@ -337,7 +337,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "SMALLINT");
             }
-            return new Short((short) source);
+            return Short.valueOf((short) source);
 
         case Types.INTEGER:
             if (Configuration.rangeCheckCrossConverters &&
@@ -345,7 +345,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "INTEGER");
             }
-            return new Integer((int) source);
+            return Integer.valueOf((int) source);
 
         case Types.BIGINT:
             if (Configuration.rangeCheckCrossConverters &&
@@ -353,7 +353,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "BIGINT");
             }
-            return new Long((long) source);
+            return Long.valueOf((long) source);
 
         case Types.REAL:
             if (Configuration.rangeCheckCrossConverters &&
@@ -371,7 +371,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "REAL");
             }
-            return new Float(source);
+            return Float.valueOf(source);
 
         case Types.DOUBLE:
             if (Configuration.rangeCheckCrossConverters &&
@@ -388,7 +388,7 @@ final class CrossConverters {
                     agent_.logWriter_, "DOUBLE");
             }
             // source passed in is a float, do we need to check if the source already contains "infinity"??
-            return new Double(String.valueOf(source));
+            return Double.valueOf(String.valueOf(source));
 
         case Types.DECIMAL:
             // Can't use the following commented out line because it changes precision of the result.
@@ -421,7 +421,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "SMALLINT");
             }
-            return new Short((short) source);
+            return Short.valueOf((short) source);
 
         case Types.INTEGER:
             if (Configuration.rangeCheckCrossConverters &&
@@ -429,7 +429,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "INTEGER");
             }
-            return new Integer((int) source);
+            return Integer.valueOf((int) source);
 
         case Types.BIGINT:
             if (Configuration.rangeCheckCrossConverters &&
@@ -437,7 +437,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "BIGINT");
             }
-            return new Long((long) source);
+            return Long.valueOf((long) source);
 
         case Types.REAL:
             if (Configuration.rangeCheckCrossConverters &&
@@ -445,7 +445,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "REAL");
             }
-            return new Float((float) source);
+            return Float.valueOf((float) source);
 
         case Types.DOUBLE:
             if (Configuration.rangeCheckCrossConverters &&
@@ -463,7 +463,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "DOUBLE");
             }
-            return new Double(source);
+            return Double.valueOf(source);
 
         case Types.DECIMAL:
             return new java.math.BigDecimal(String.valueOf(source));  // This matches derby semantics
@@ -494,7 +494,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "SMALLINT");
             }
-            return new Short(source.shortValue());
+            return Short.valueOf(source.shortValue());
 
         case Types.INTEGER:
             if (Configuration.rangeCheckCrossConverters &&
@@ -502,7 +502,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "INTEGER");
             }
-            return new Integer(source.intValue());
+            return Integer.valueOf(source.intValue());
 
         case Types.BIGINT:
             if (Configuration.rangeCheckCrossConverters &&
@@ -510,7 +510,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "BIGINT");
             }
-            return new Long(source.longValue());
+            return Long.valueOf(source.longValue());
 
         case Types.REAL:
             if (Configuration.rangeCheckCrossConverters &&
@@ -518,7 +518,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "REAL");
             }
-            return new Float(source.floatValue());
+            return Float.valueOf(source.floatValue());
 
         case Types.DOUBLE:
             if (Configuration.rangeCheckCrossConverters &&
@@ -526,7 +526,7 @@ final class CrossConverters {
                 throw new OutsideRangeForDataTypeException(
                     agent_.logWriter_, "DOUBLE");
             }
-            return new Double(source.doubleValue());
+            return Double.valueOf(source.doubleValue());
 
         case Types.DECIMAL:
             return source;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java Wed Jul 25 06:47:20 2012
@@ -1292,17 +1292,18 @@ public abstract class Cursor {
     public final Object getObject(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
         case java.sql.Types.BOOLEAN:
-            return get_BOOLEAN(column) ? Boolean.TRUE : Boolean.FALSE;
+            return get_BOOLEAN(column);
         case java.sql.Types.SMALLINT:
-            return new Integer(get_SMALLINT(column)); // See Table 4 in JDBC 1 spec (pg. 932 in jdbc book)
+            // See Table 4 in JDBC 1 spec (pg. 932 in jdbc book)
+            return Integer.valueOf(get_SMALLINT(column));
         case java.sql.Types.INTEGER:
-            return new Integer(get_INTEGER(column));
+            return get_INTEGER(column);
         case java.sql.Types.BIGINT:
-            return new Long(get_BIGINT(column));
+            return get_BIGINT(column);
         case java.sql.Types.REAL:
-            return new Float(get_FLOAT(column));
+            return get_FLOAT(column);
         case java.sql.Types.DOUBLE:
-            return new Double(get_DOUBLE(column));
+            return get_DOUBLE(column);
         case java.sql.Types.DECIMAL:
             return get_DECIMAL(column);
         case java.sql.Types.DATE:

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java Wed Jul 25 06:47:20 2012
@@ -269,7 +269,7 @@ public class DateTime {
         if (year > 9999) {
             throw new SqlException(null,
                 new ClientMessageId(SQLState.YEAR_EXCEEDS_MAXIMUM),
-                new Integer(year), "9999");
+                year, "9999");
         }
         int month = date.getMonth() + 1;
         int day = date.getDayOfMonth();
@@ -356,7 +356,7 @@ public class DateTime {
         if (year > 9999) {
             throw new SqlException(null,
                 new ClientMessageId(SQLState.YEAR_EXCEEDS_MAXIMUM),
-                new Integer(year), "9999");
+                year, "9999");
         }
         int month = timestamp.getMonth() + 1;
         int day = timestamp.getDayOfMonth();

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/EncryptionManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/EncryptionManager.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/EncryptionManager.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/EncryptionManager.java Wed Jul 25 06:47:20 2012
@@ -251,7 +251,7 @@ public class EncryptionManager {
         if (key.length != 8) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.DES_KEY_HAS_WRONG_LENGTH), 
-                new Integer(8), new Integer(key.length)); 
+                8, key.length);
                         
         }
         for (int i = 0; i < 8; i++) {
@@ -337,7 +337,7 @@ public class EncryptionManager {
             } else {
                 throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.SHARED_KEY_LENGTH_ERROR),
-                    new Integer(sharedSecret.length)); 
+                    sharedSecret.length);
             }
 
             //we do parity check here and flip the parity bit if the byte has even number of 1s

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java Wed Jul 25 06:47:20 2012
@@ -312,17 +312,17 @@ public abstract class Lob implements Uni
         if (pos <= 0) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.BLOB_BAD_POSITION),
-                new Long(pos)).getSQLException();
+                pos).getSQLException();
         }
         if (length < 0) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
-                new Integer((int)length)).getSQLException();
+                length).getSQLException();
         }
         if (length > (this.length() - (pos -1))) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.POS_AND_LENGTH_GREATER_THAN_LOB),
-                new Long(pos), new Long(length)).getSQLException();
+                pos, length).getSQLException();
         }
     }
     

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java Wed Jul 25 06:47:20 2012
@@ -461,7 +461,7 @@ public class PreparedStatement extends S
         if (!parameterMetaData_.nullable_[parameterIndex - 1]) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.LANG_NULL_INTO_NON_NULL),
-                new Integer(parameterIndex));
+                parameterIndex);
         }
         setInput(parameterIndex, null);
     }
@@ -525,7 +525,7 @@ public class PreparedStatement extends S
                 }
                 
                 parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.TINYINT;
-                setInput(parameterIndex, new Short(x));
+                setInput(parameterIndex, Short.valueOf(x));
             }
         }
         catch ( SqlException se )
@@ -566,7 +566,7 @@ public class PreparedStatement extends S
     // also used by DBMD methods
     void setShortX(int parameterIndex, short x) throws SqlException {
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.SMALLINT;
-        setInput(parameterIndex, new Short(x));
+        setInput(parameterIndex, x);
 
     }
 
@@ -600,7 +600,7 @@ public class PreparedStatement extends S
     // also used by DBMD methods
     void setIntX(int parameterIndex, int x) throws SqlException {
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.INTEGER;
-        setInput(parameterIndex, new Integer(x));
+        setInput(parameterIndex, x);
     }
 
 
@@ -635,7 +635,7 @@ public class PreparedStatement extends S
         // Column numbers starts at 1, clientParamtertype_[0] refers to column 1
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] 
                 = java.sql.Types.BIGINT;
-        setInput(parameterIndex, new Long(x));
+        setInput(parameterIndex, x);
     }
 
     public void setFloat(int parameterIndex, float x) throws SQLException {
@@ -658,7 +658,7 @@ public class PreparedStatement extends S
                 }
                 
                 parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.REAL;
-                setInput(parameterIndex, new Float(x));
+                setInput(parameterIndex, x);
             }
         }
         catch ( SqlException se )
@@ -957,7 +957,8 @@ public class PreparedStatement extends S
         {
             synchronized (connection_) {
                 if (agent_.loggingEnabled()) {
-                    agent_.logWriter_.traceEntry(this, "setBinaryStream", parameterIndex, "<input stream>", new Long(length));
+                    agent_.logWriter_.traceEntry(this, "setBinaryStream",
+                        parameterIndex, "<input stream>", Long.valueOf(length));
                 }
                 
                 checkTypeForSetBinaryStream(parameterIndex);
@@ -1025,7 +1026,7 @@ public class PreparedStatement extends S
             synchronized (connection_) {
                 if (agent_.loggingEnabled()) {
                     agent_.logWriter_.traceEntry(this, "setAsciiStream",
-                            parameterIndex, "<input stream>", new Long(length));
+                        parameterIndex, "<input stream>", Long.valueOf(length));
                 }
                 
                 checkTypeForSetAsciiStream(parameterIndex);
@@ -1073,8 +1074,8 @@ public class PreparedStatement extends S
                         agent_.logWriter_,
                         new ClientMessageId(
                             SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE),
-                        new Long(length),
-                        new Integer(Integer.MAX_VALUE)
+                        length,
+                        Integer.MAX_VALUE
                     ).getSQLException();
         } else if (length < 0) {
             throw new SqlException(
@@ -1224,7 +1225,8 @@ public class PreparedStatement extends S
         {
             synchronized (connection_) {
                 if (agent_.loggingEnabled()) {
-                    agent_.logWriter_.traceEntry(this, "setCharacterStream", parameterIndex, x, new Long(length));
+                    agent_.logWriter_.traceEntry(this, "setCharacterStream",
+                            parameterIndex, x, Long.valueOf(length));
                 }
                 checkTypeForSetCharacterStream(parameterIndex);
                 parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.CLOB;
@@ -2185,7 +2187,7 @@ public class PreparedStatement extends S
             if (resultSet_ != null && resultSet_.resultSetHoldability_ != resultSetHoldability_ && sqlMode_ != isCall__) {
                 throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.UNABLE_TO_OPEN_RESULTSET_WITH_REQUESTED_HOLDABILTY),
-                        new Integer(resultSetHoldability_));
+                        resultSetHoldability_);
             }
     }
 
@@ -2223,7 +2225,7 @@ public class PreparedStatement extends S
 		if (batchSize > 65534)
             throw new BatchUpdateException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.TOO_MANY_COMMANDS_FOR_BATCH), 
-                new Integer(65534), updateCounts);
+                65534, updateCounts);
 
         // Initialize all the updateCounts to indicate failure
         // This is done to account for "chain-breaking" errors where we cannot
@@ -2413,8 +2415,7 @@ public class PreparedStatement extends S
         if (parameterIndex < 1 || parameterIndex > parameterMetaData_.columns_) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.LANG_INVALID_PARAM_POSITION),
-                new Integer(parameterIndex), 
-                new Integer(parameterMetaData_.columns_));
+                parameterIndex, parameterMetaData_.columns_);
         }
     }
 
@@ -2432,8 +2433,7 @@ public class PreparedStatement extends S
     void checkForValidScale(int scale) throws SqlException {
         if (scale < 0 || scale > 31) {
             throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.BAD_SCALE_VALUE),
-                new Integer(scale));
+                new ClientMessageId(SQLState.BAD_SCALE_VALUE), scale);
         }
     }
 
@@ -2651,7 +2651,7 @@ public class PreparedStatement extends S
         synchronized (connection_) {
             if (agent_.loggingEnabled()) {
                 agent_.logWriter_.traceEntry(this, "setClob",
-                        parameterIndex, reader, new Long(length));
+                        parameterIndex, reader, Long.valueOf(length));
             }
             try {
                 checkForClosedStatement();
@@ -2661,7 +2661,7 @@ public class PreparedStatement extends S
             if(length > Integer.MAX_VALUE)
                 throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT),
-                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
+                    length, Integer.MAX_VALUE).getSQLException();
             else
                 setInput(parameterIndex, new Clob(agent_, reader, (int)length));
         }
@@ -2722,12 +2722,12 @@ public class PreparedStatement extends S
         synchronized (connection_) {
             if (agent_.loggingEnabled()) {
                 agent_.logWriter_.traceEntry(this, "setBlob", parameterIndex,
-                        inputStream, new Long(length));
+                        inputStream, Long.valueOf(length));
             }
             if(length > Integer.MAX_VALUE)
                 throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT),
-                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
+                    length, Integer.MAX_VALUE).getSQLException();
             else {
                 try {
                     checkTypeForSetBlob(parameterIndex);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java Wed Jul 25 06:47:20 2012
@@ -250,8 +250,7 @@ public abstract class ResultSet implemen
                 new SqlWarning(
                     agent_.logWriter_, 
                     new ClientMessageId(SQLState.INVALID_RESULTSET_TYPE),
-                        new Integer(statement_.resultSetType_),
-                        new Integer(resultSetType_)));
+                        statement_.resultSetType_, resultSetType_));
         }
 
         // Only set the warning if actual resultSetConcurrency returned by the server is
@@ -2359,7 +2358,7 @@ public abstract class ResultSet implemen
         if (row > Integer.MAX_VALUE) {
             this.accumulateWarning(new SqlWarning(agent_.logWriter_, 
                 new ClientMessageId(SQLState.NUMBER_OF_ROWS_TOO_LARGE_FOR_INT),
-                new Long(row)));
+                row));
         }
         return (int) row;
     }
@@ -2658,7 +2657,7 @@ public abstract class ResultSet implemen
                 default:
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.INVALID_FETCH_DIRECTION),
-                        new Integer(direction));
+                        direction);
                 }
             }
         }
@@ -2694,7 +2693,7 @@ public abstract class ResultSet implemen
                 if (rows < 0 || (maxRows_ != 0 && rows > maxRows_)) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.INVALID_FETCH_SIZE),
-                        new Integer(rows)).getSQLException();
+                        rows).getSQLException();
                 }
                 setFetchSize_(rows);
             }
@@ -2827,7 +2826,7 @@ public abstract class ResultSet implemen
                 if (!resultSetMetaData_.nullable_[column - 1]) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.LANG_NULL_INTO_NON_NULL),
-                        new Integer(column));
+                        column);
                 }
                 updateColumn(column, null);
             }
@@ -4771,7 +4770,7 @@ public abstract class ResultSet implemen
         if (column < 1 || column > resultSetMetaData_.columns_) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.LANG_INVALID_COLUMN_POSITION),
-                new Integer(column), new Integer(resultSetMetaData_.columns_));
+                column, resultSetMetaData_.columns_);
         }
     }
 
@@ -5673,7 +5672,7 @@ public abstract class ResultSet implemen
         if(length > Integer.MAX_VALUE)
                 throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE),
-                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
+                    length, Integer.MAX_VALUE).getSQLException();
         else
             updateAsciiStream(columnIndex,x,(int)length);
     }
@@ -5737,7 +5736,7 @@ public abstract class ResultSet implemen
          if(length > Integer.MAX_VALUE)
                 throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE),
-                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
+                    length, Integer.MAX_VALUE).getSQLException();
         else
             updateBinaryStream(columnIndex,x,(int)length);
 
@@ -5838,7 +5837,7 @@ public abstract class ResultSet implemen
         if(length > Integer.MAX_VALUE)
                 throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.CLIENT_LENGTH_OUTSIDE_RANGE_FOR_DATATYPE),
-                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
+                    length, Integer.MAX_VALUE).getSQLException();
         else
             updateCharacterStream(columnIndex,x,(int)length);
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java Wed Jul 25 06:47:20 2012
@@ -126,7 +126,7 @@ public class SectionManager {
         } else {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.UNSUPPORTED_HOLDABILITY_PROPERTY), 
-                new Integer(resultSetHoldability));
+                resultSetHoldability);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Wed Jul 25 06:47:20 2012
@@ -383,7 +383,7 @@ public class Statement implements java.s
         default:
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Integer(type), "type", "createStatement()");
+                type, "type", "createStatement()");
         }
 
         switch (concurrency) {
@@ -394,8 +394,7 @@ public class Statement implements java.s
         default:
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Integer(concurrency), "concurrency",
-                "createStatement()");
+                concurrency, "concurrency", "createStatement()");
         }
 
         switch (holdability) {
@@ -406,8 +405,7 @@ public class Statement implements java.s
         default:
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Integer(holdability), "holdability",
-                "createStatement()");
+                holdability, "holdability", "createStatement()");
         }
 
         switch (autoGeneratedKeys) {
@@ -418,8 +416,7 @@ public class Statement implements java.s
         default:
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Integer(autoGeneratedKeys),
-                "autoGeneratedKeys", "createStatement");
+                autoGeneratedKeys, "autoGeneratedKeys", "createStatement");
         }
 
         generatedKeysColumnNames_ = columnNames;
@@ -692,7 +689,7 @@ public class Statement implements java.s
                 if (max < 0) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.INVALID_MAXFIELD_SIZE),
-                        new Integer(max));
+                        max);
                 }
                 maxFieldSize_ = max;
             }
@@ -729,7 +726,7 @@ public class Statement implements java.s
                 if (maxRows < 0) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.INVALID_MAX_ROWS_VALUE),
-                        new Integer(maxRows));
+                        maxRows);
                 }
                 maxRows_ = maxRows;
             }
@@ -782,7 +779,7 @@ public class Statement implements java.s
                 if (seconds < 0) {
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.INVALID_QUERYTIMEOUT_VALUE),
-                        new Integer(seconds));
+                        seconds);
                 }
                 if (seconds != timeout_) {
                     timeout_ = seconds;
@@ -988,7 +985,7 @@ public class Statement implements java.s
                 default:
                     throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.INVALID_FETCH_DIRECTION),
-                        new Integer(direction));
+                        direction);
                 }
             }
         }
@@ -1025,7 +1022,7 @@ public class Statement implements java.s
                 if (rows < 0 || (maxRows_ != 0 && rows > maxRows_)) {
                     throw new SqlException(agent_.logWriter_, 
                         new ClientMessageId(SQLState.INVALID_ST_FETCH_SIZE),
-                        new Integer(rows)).getSQLException();
+                        rows).getSQLException();
                 }
                 fetchSize_ = rows;
             }
@@ -2179,7 +2176,7 @@ public class Statement implements java.s
             if (resultSet_ != null && resultSet_.resultSetHoldability_ != resultSetHoldability_ && sqlMode_ != isCall__) {
                 throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.UNABLE_TO_OPEN_RS_WITH_REQUESTED_HOLDABILITY),
-                    new Integer(resultSetHoldability_));
+                    resultSetHoldability_);
             }
 
         // In the case of executing a call to a stored procedure.
@@ -2933,7 +2930,7 @@ public class Statement implements java.s
                 autoGeneratedKeys_ != java.sql.Statement.RETURN_GENERATED_KEYS) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                new Integer(autoGeneratedKeys_), "autoGeneratedKeys",
+                autoGeneratedKeys_, "autoGeneratedKeys",
                 "Statement.execute()/executeQuery()");
         }
 
@@ -2943,14 +2940,14 @@ public class Statement implements java.s
                 generatedKeysColumnNames_.length > 1) {
             throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.INVALID_COLUMN_ARRAY_LENGTH),
-                    new Integer(generatedKeysColumnNames_.length));
+                    generatedKeysColumnNames_.length);
             }
         
         if (generatedKeysColumnIndexes_ != null && 
                 generatedKeysColumnIndexes_.length > 1) {
             throw new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.INVALID_COLUMN_ARRAY_LENGTH),
-                    new Integer(generatedKeysColumnIndexes_.length));
+                    generatedKeysColumnIndexes_.length);
             }
         }
     

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePointNameTable.java Wed Jul 25 06:47:20 2012
@@ -29,65 +29,65 @@ package org.apache.derby.client.net;
 
 class CodePointNameTable extends java.util.Hashtable<Integer, String> {
     CodePointNameTable() {
-        put(new Integer(CodePoint.ACCSECRD), "ACCSECRD");
-        put(new Integer(CodePoint.TYPDEFNAM), "TYPDEFNAM");
-        put(new Integer(CodePoint.TYPDEFOVR), "TYPDEFOVR");
-        put(new Integer(CodePoint.EXCSAT), "EXCSAT");
-        put(new Integer(CodePoint.SYNCCTL), "SYNCCTL");
-        put(new Integer(CodePoint.SYNCCRD), "SYNCCRD");
-        put(new Integer(CodePoint.SYNCRSY), "SYNCRSY");
-        put(new Integer(CodePoint.ACCSEC), "ACCSEC");
-        put(new Integer(CodePoint.SECCHK), "SECCHK");
-        put(new Integer(CodePoint.MGRLVLRM), "MGRLVLRM");
-        put(new Integer(CodePoint.SECCHKRM), "SECCHKRM");
-        put(new Integer(CodePoint.CMDNSPRM), "CMDNSPRM");
-        put(new Integer(CodePoint.OBJNSPRM), "OBJNSPRM");
-        put(new Integer(CodePoint.CMDCHKRM), "CMDCHKRM");
-        put(new Integer(CodePoint.SYNTAXRM), "SYNTAXRM");
-        put(new Integer(CodePoint.VALNSPRM), "VALNSPRM");
-        put(new Integer(CodePoint.EXCSATRD), "EXCSATRD");
-        put(new Integer(CodePoint.ACCRDB), "ACCRDB");
-        put(new Integer(CodePoint.CLSQRY), "CLSQRY");
-        put(new Integer(CodePoint.CNTQRY), "CNTQRY");
-        put(new Integer(CodePoint.DSCSQLSTT), "DSCSQLSTT");
-        put(new Integer(CodePoint.EXCSQLIMM), "EXCSQLIMM");
-        put(new Integer(CodePoint.EXCSQLSTT), "EXCSQLSTT");
-        put(new Integer(CodePoint.OPNQRY), "OPNQRY");
-        put(new Integer(CodePoint.OUTOVR), "OUTOVR");
-        put(new Integer(CodePoint.PRPSQLSTT), "PRPSQLSTT");
-        put(new Integer(CodePoint.RDBCMM), "RDBCMM");
-        put(new Integer(CodePoint.RDBRLLBCK), "RDBRLLBCK");
-        put(new Integer(CodePoint.DSCRDBTBL), "DSCRDBTBL");
-        put(new Integer(CodePoint.ACCRDBRM), "ACCRDBRM");
-        put(new Integer(CodePoint.QRYNOPRM), "QRYNOPRM");
-        put(new Integer(CodePoint.RDBATHRM), "RDBATHRM");
-        put(new Integer(CodePoint.RDBNACRM), "RDBNACRM");
-        put(new Integer(CodePoint.OPNQRYRM), "OPNQRYRM");
-        put(new Integer(CodePoint.RDBACCRM), "RDBACCRM");
-        put(new Integer(CodePoint.ENDQRYRM), "ENDQRYRM");
-        put(new Integer(CodePoint.ENDUOWRM), "ENDUOWRM");
-        put(new Integer(CodePoint.ABNUOWRM), "ABNUOWRM");
-        put(new Integer(CodePoint.DTAMCHRM), "DTAMCHRM");
-        put(new Integer(CodePoint.QRYPOPRM), "QRYPOPRM");
-        put(new Integer(CodePoint.RDBNFNRM), "RDBNFNRM");
-        put(new Integer(CodePoint.OPNQFLRM), "OPNQFLRM");
-        put(new Integer(CodePoint.SQLERRRM), "SQLERRRM");
-        put(new Integer(CodePoint.RDBUPDRM), "RDBUPDRM");
-        put(new Integer(CodePoint.RSLSETRM), "RSLSETRM");
-        put(new Integer(CodePoint.RDBAFLRM), "RDBAFLRM");
-        put(new Integer(CodePoint.SQLCARD), "SQLCARD");
-        put(new Integer(CodePoint.SQLDARD), "SQLDARD");
-        put(new Integer(CodePoint.SQLDTA), "SQLDTA");
-        put(new Integer(CodePoint.SQLDTARD), "SQLDTARD");
-        put(new Integer(CodePoint.SQLSTT), "SQLSTT");
-        put(new Integer(CodePoint.QRYDSC), "QRYDSC");
-        put(new Integer(CodePoint.QRYDTA), "QRYDTA");
-        put(new Integer(CodePoint.PRCCNVRM), "PRCCNVRM");
-        put(new Integer(CodePoint.EXCSQLSET), "EXCSQLSET");
-        put(new Integer(CodePoint.EXTDTA), "EXTDTA");
-        put(new Integer(CodePoint.PBSD), "PBSD");
-        put(new Integer(CodePoint.PBSD_ISO), "PBSD_ISO");
-        put(new Integer(CodePoint.PBSD_SCHEMA), "PBSD_SCHEMA");
+        put(CodePoint.ACCSECRD, "ACCSECRD");
+        put(CodePoint.TYPDEFNAM, "TYPDEFNAM");
+        put(CodePoint.TYPDEFOVR, "TYPDEFOVR");
+        put(CodePoint.EXCSAT, "EXCSAT");
+        put(CodePoint.SYNCCTL, "SYNCCTL");
+        put(CodePoint.SYNCCRD, "SYNCCRD");
+        put(CodePoint.SYNCRSY, "SYNCRSY");
+        put(CodePoint.ACCSEC, "ACCSEC");
+        put(CodePoint.SECCHK, "SECCHK");
+        put(CodePoint.MGRLVLRM, "MGRLVLRM");
+        put(CodePoint.SECCHKRM, "SECCHKRM");
+        put(CodePoint.CMDNSPRM, "CMDNSPRM");
+        put(CodePoint.OBJNSPRM, "OBJNSPRM");
+        put(CodePoint.CMDCHKRM, "CMDCHKRM");
+        put(CodePoint.SYNTAXRM, "SYNTAXRM");
+        put(CodePoint.VALNSPRM, "VALNSPRM");
+        put(CodePoint.EXCSATRD, "EXCSATRD");
+        put(CodePoint.ACCRDB, "ACCRDB");
+        put(CodePoint.CLSQRY, "CLSQRY");
+        put(CodePoint.CNTQRY, "CNTQRY");
+        put(CodePoint.DSCSQLSTT, "DSCSQLSTT");
+        put(CodePoint.EXCSQLIMM, "EXCSQLIMM");
+        put(CodePoint.EXCSQLSTT, "EXCSQLSTT");
+        put(CodePoint.OPNQRY, "OPNQRY");
+        put(CodePoint.OUTOVR, "OUTOVR");
+        put(CodePoint.PRPSQLSTT, "PRPSQLSTT");
+        put(CodePoint.RDBCMM, "RDBCMM");
+        put(CodePoint.RDBRLLBCK, "RDBRLLBCK");
+        put(CodePoint.DSCRDBTBL, "DSCRDBTBL");
+        put(CodePoint.ACCRDBRM, "ACCRDBRM");
+        put(CodePoint.QRYNOPRM, "QRYNOPRM");
+        put(CodePoint.RDBATHRM, "RDBATHRM");
+        put(CodePoint.RDBNACRM, "RDBNACRM");
+        put(CodePoint.OPNQRYRM, "OPNQRYRM");
+        put(CodePoint.RDBACCRM, "RDBACCRM");
+        put(CodePoint.ENDQRYRM, "ENDQRYRM");
+        put(CodePoint.ENDUOWRM, "ENDUOWRM");
+        put(CodePoint.ABNUOWRM, "ABNUOWRM");
+        put(CodePoint.DTAMCHRM, "DTAMCHRM");
+        put(CodePoint.QRYPOPRM, "QRYPOPRM");
+        put(CodePoint.RDBNFNRM, "RDBNFNRM");
+        put(CodePoint.OPNQFLRM, "OPNQFLRM");
+        put(CodePoint.SQLERRRM, "SQLERRRM");
+        put(CodePoint.RDBUPDRM, "RDBUPDRM");
+        put(CodePoint.RSLSETRM, "RSLSETRM");
+        put(CodePoint.RDBAFLRM, "RDBAFLRM");
+        put(CodePoint.SQLCARD, "SQLCARD");
+        put(CodePoint.SQLDARD, "SQLDARD");
+        put(CodePoint.SQLDTA, "SQLDTA");
+        put(CodePoint.SQLDTARD, "SQLDTARD");
+        put(CodePoint.SQLSTT, "SQLSTT");
+        put(CodePoint.QRYDSC, "QRYDSC");
+        put(CodePoint.QRYDTA, "QRYDTA");
+        put(CodePoint.PRCCNVRM, "PRCCNVRM");
+        put(CodePoint.EXCSQLSET, "EXCSQLSET");
+        put(CodePoint.EXTDTA, "EXTDTA");
+        put(CodePoint.PBSD, "PBSD");
+        put(CodePoint.PBSD_ISO, "PBSD_ISO");
+        put(CodePoint.PBSD_SCHEMA, "PBSD_SCHEMA");
     }
 
     String lookup(int codePoint) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java Wed Jul 25 06:47:20 2012
@@ -433,7 +433,7 @@ public class NetConnection extends org.a
             default:
                 throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.SECMECH_NOT_SUPPORTED),
-                    new Integer(securityMechanism));
+                    securityMechanism);
             }
         } catch (java.lang.Throwable e) { // if *anything* goes wrong, make sure the connection is destroyed
             // always mark the connection closed in case of an error.
@@ -556,7 +556,7 @@ public class NetConnection extends org.a
             default:
                 throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.SECMECH_NOT_SUPPORTED),
-                    new Integer(securityMechanism));
+                    securityMechanism);
             }
         } catch (SqlException sqle) {            // this may not be needed because on method up the stack
             open_ = false;                       // all reset exceptions are caught and wrapped in disconnect exceptions
@@ -1086,8 +1086,7 @@ public class NetConnection extends org.a
         if ((usridLength == 0) || (usridLength > NetConfiguration.USRID_MAXSIZE)) {
             throw new SqlException(netAgent_.logWriter_, 
                 new ClientMessageId(SQLState.CONNECT_USERID_LENGTH_OUT_OF_RANGE),
-                new Integer(usridLength), 
-                new Integer(NetConfiguration.USRID_MAXSIZE));
+                usridLength, NetConfiguration.USRID_MAXSIZE);
         }
     }
 
@@ -1096,8 +1095,7 @@ public class NetConnection extends org.a
         if ((passwordLength == 0) || (passwordLength > NetConfiguration.PASSWORD_MAXSIZE)) {
             throw new SqlException(netAgent_.logWriter_,
                 new ClientMessageId(SQLState.CONNECT_PASSWORD_LENGTH_OUT_OF_RANGE),
-                new Integer(passwordLength),
-                new Integer(NetConfiguration.PASSWORD_MAXSIZE));
+                passwordLength, NetConfiguration.PASSWORD_MAXSIZE);
         }
     }
 
@@ -1141,7 +1139,7 @@ public class NetConnection extends org.a
         if (!secmecSupported) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.SECMECH_NOT_SUPPORTED),
-                new Integer(securityMechanism));
+                securityMechanism);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java Wed Jul 25 06:47:20 2012
@@ -169,7 +169,7 @@ public class  NetConnection40 extends or
         if (timeout < 0) {
             throw new SqlException(agent_.logWriter_,
                                new ClientMessageId(SQLState.INVALID_API_PARAMETER),
-                               new Integer(timeout), "timeout",
+                               timeout, "timeout",
                                "java.sql.Connection.isValid" ).getSQLException();
         }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java Wed Jul 25 06:47:20 2012
@@ -2832,7 +2832,7 @@ public class NetConnectionReply extends 
             }
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                 new ClientMessageId(SQLState.DRDA_NO_AVAIL_CODEPAGE_CONVERSION),
-                new Integer(cpValue), value));
+                cpValue, value));
             return;
         }
         // the problem isn't with one of the ccsid values so...

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java Wed Jul 25 06:47:20 2012
@@ -512,7 +512,7 @@ public class NetCursor extends org.apach
             // key = column position, data = index to corresponding data in extdtaData_
             // ASSERT: the server always returns the EXTDTA objects in ascending order
             {
-                extdtaPositions_.put(new Integer(i + 1), new Integer(currentPosition++));
+                extdtaPositions_.put(i + 1, currentPosition++);
             }
         }
     }
@@ -884,11 +884,10 @@ public class NetCursor extends org.apach
         byte[] data = null;
 
         // locate the EXTDTA bytes, if any
-        Integer key = new Integer(column);
+        Integer extdtaQueuePosition = extdtaPositions_.get(column);
 
-        if (extdtaPositions_.containsKey(key)) {
+        if (extdtaQueuePosition != null) {
             //  found, get the data
-            int extdtaQueuePosition = ((Integer) extdtaPositions_.get(key)).intValue();
             data = extdtaData_.get(extdtaQueuePosition);
         }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetPackageRequest.java Wed Jul 25 06:47:20 2012
@@ -168,7 +168,7 @@ public class NetPackageRequest extends N
         if (length > maxIdentifierLength) {
             throw new SqlException(netAgent_.logWriter_,
                 new ClientMessageId(SQLState.LANG_IDENTIFIER_TOO_LONG),
-                identifier, new Integer(maxIdentifierLength));
+                identifier, maxIdentifierLength);
         }
 
         return (length > lengthRequiringScldta);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java Wed Jul 25 06:47:20 2012
@@ -1593,7 +1593,7 @@ public class NetStatementReply extends N
                     new DisconnectException(agent_,
                         new ClientMessageId(
                             SQLState.NET_SQLCDTA_INVALID_FOR_RDBNAM),
-                    new Integer(scldtaLen)));
+                    scldtaLen));
                 return null;
             }
             // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
@@ -1607,7 +1607,7 @@ public class NetStatementReply extends N
             if (scldtaLen < 18 || scldtaLen > 255) {
                 agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                     new ClientMessageId(SQLState.NET_SQLCDTA_INVALID_FOR_RDBCOLID),
-                    new Integer(scldtaLen)));
+                    scldtaLen));
                 return null;
             }
             // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
@@ -1620,7 +1620,7 @@ public class NetStatementReply extends N
             if (scldtaLen < 18 || scldtaLen > 255) {
                 agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                     new ClientMessageId(SQLState.NET_SQLCDTA_INVALID_FOR_PKGID),
-                    new Integer(scldtaLen)));
+                    scldtaLen));
                 return null; // To make compiler happy.
             }
             // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
@@ -1635,7 +1635,7 @@ public class NetStatementReply extends N
         } else {
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                 new ClientMessageId(SQLState.NET_PGNAMCSN_INVALID_AT_SQLAM),
-                new Integer(ddmLength), new Integer(netAgent_.targetSqlam_)));
+                ddmLength, netAgent_.targetSqlam_));
             return null;  // To make compiler happy.
         }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java Wed Jul 25 06:47:20 2012
@@ -907,8 +907,7 @@ public class NetStatementRequest extends
                     default:
                         throw new SqlException(netAgent_.logWriter_, 
                             new ClientMessageId(SQLState.NET_UNRECOGNIZED_JDBC_TYPE),
-                               new Integer(protocolTypesAndLengths[i][0]),
-                               new Integer(numVars), new Integer(i));
+                               protocolTypesAndLengths[i][0], numVars, i);
                     }
                 }
             }
@@ -1170,7 +1169,7 @@ public class NetStatementRequest extends
                 if (jdbcType == 0) {
                     throw new SqlException(netAgent_.logWriter_, 
                         new ClientMessageId(SQLState.NET_INVALID_JDBC_TYPE_FOR_PARAM),
-                        new Integer(i));
+                        i);
                 }
 
                 switch (jdbcType) {
@@ -1239,7 +1238,7 @@ public class NetStatementRequest extends
                         lidAndLengths[i][1] = 2;
                         if (inputRow[i] instanceof Boolean) {
                             Boolean bool = (Boolean) inputRow[i];
-                            inputRow[i] = new Short(
+                            inputRow[i] = Short.valueOf(
                                     bool.booleanValue() ? (short) 1 : 0);
                         }
                     }
@@ -1535,7 +1534,7 @@ public class NetStatementRequest extends
                 default :
                     throw new SqlException(netAgent_.logWriter_, 
                         new ClientMessageId(SQLState.UNRECOGNIZED_JAVA_SQL_TYPE),
-                        new Integer(jdbcType));
+                        jdbcType);
                 }
 
                 if (!parameterMetaData.nullable_[i]) {
@@ -1627,7 +1626,7 @@ public class NetStatementRequest extends
         if ((prcnamLength == 0) || (prcnamLength > 255)) {
             throw new SqlException(netAgent_.logWriter_, 
                 new ClientMessageId(SQLState.NET_PROCEDURE_NAME_LENGTH_OUT_OF_RANGE),
-                new Integer(prcnamLength), new Integer(255));
+                prcnamLength, 255);
         }
 
         writeScalarString(CodePoint.PRCNAM, prcnam);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java Wed Jul 25 06:47:20 2012
@@ -236,8 +236,7 @@ public class NetXAConnection {    
         platform = "Linux, Unix, Windows";
         throw new SqlException(netCon.agent_.logWriter_, 
             new ClientMessageId(SQLState.NET_WRONG_XA_VERSION),
-            platform, new Integer(supportedVersion), 
-            new Integer(netCon.xaHostVersion_));
+            platform, supportedVersion, netCon.xaHostVersion_);
     }
     
     /**

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Reply.java Wed Jul 25 06:47:20 2012
@@ -196,8 +196,7 @@ public class Reply {
                 netAgent_.accumulateChainBreakingReadExceptionAndThrow(
                     new DisconnectException(netAgent_,
                         new ClientMessageId(SQLState.NET_INSUFFICIENT_DATA),
-                        new Integer(minimumBytesNeeded),
-                        new Integer(totalBytesRead)));
+                        minimumBytesNeeded, totalBytesRead));
             }
         }
         return totalBytesRead;
@@ -953,7 +952,7 @@ public class Reply {
                 new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
                 SqlException.getMessageUtil().getTextMessage(
                     MessageId.CONN_DRDA_DATASTREAM_SYNTAX_ERROR,
-                    new Integer(syntaxErrorCode)));
+                    syntaxErrorCode));
             
         // if we are communicating to an older server, we may get a SYNTAXRM on
         // ACCSEC (missing codepoint RDBNAM) if we were unable to convert to
@@ -1075,8 +1074,7 @@ public class Reply {
             agent_.accumulateChainBreakingReadExceptionAndThrow(
                 new DisconnectException(agent_, 
                     new ClientMessageId(SQLState.NET_NOT_EXPECTED_CODEPOINT), 
-                    new Integer(actualCodePoint), 
-                    new Integer(expectedCodePoint)));
+                    actualCodePoint, expectedCodePoint));
         }
     }
 
@@ -1391,8 +1389,7 @@ public class Reply {
             agent_.accumulateChainBreakingReadExceptionAndThrow(
                 new DisconnectException(agent_, 
                     new ClientMessageId(SQLState.NET_NOT_EXPECTED_CODEPOINT), 
-                    new Integer(actualCodePoint), 
-                    new Integer(expectedCodePoint)));
+                    actualCodePoint, expectedCodePoint));
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java Wed Jul 25 06:47:20 2012
@@ -323,12 +323,11 @@ public class Request {
                     padScalarStreamForError(leftToRead, bytesToRead,
                             writeEXTDTAStatusByte, status);
 					// set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
-					netAgent_.accumulateReadException(new SqlException(
-																	   netAgent_.logWriter_,
-																	   new ClientMessageId(SQLState.NET_EXCEPTION_ON_READ),
-																	   new Integer(parameterIndex),
-																	   e.getMessage(),
-																	   e));
+                    netAgent_.accumulateReadException(
+                        new SqlException(
+                            netAgent_.logWriter_,
+                            new ClientMessageId(SQLState.NET_EXCEPTION_ON_READ),
+                            parameterIndex, e.getMessage(), e));
 
 					return;
 				}
@@ -337,9 +336,10 @@ public class Request {
                     padScalarStreamForError(leftToRead, bytesToRead,
                             writeEXTDTAStatusByte, status);
 					// set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
-					netAgent_.accumulateReadException(new SqlException(netAgent_.logWriter_,
-																	   new ClientMessageId(SQLState.NET_PREMATURE_EOS),
-																	   new Integer(parameterIndex)));
+                    netAgent_.accumulateReadException(
+                        new SqlException(netAgent_.logWriter_,
+                            new ClientMessageId(SQLState.NET_PREMATURE_EOS),
+                            parameterIndex));
 					return;
 				} else {
 					bytesToRead -= bytesRead;
@@ -356,19 +356,19 @@ public class Request {
 			if (in.read() != -1) {
                 status = DRDAConstants.STREAM_TOO_LONG;
 				// set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
-				netAgent_.accumulateReadException(new SqlException(netAgent_.logWriter_,
-																   new ClientMessageId(SQLState.NET_INPUTSTREAM_LENGTH_TOO_SMALL),
-																   new Integer(parameterIndex)));
+                netAgent_.accumulateReadException(new SqlException(
+                        netAgent_.logWriter_,
+                        new ClientMessageId(
+                            SQLState.NET_INPUTSTREAM_LENGTH_TOO_SMALL),
+                        parameterIndex));
 			}
 		} catch (Exception e) {
             status = DRDAConstants.STREAM_READ_ERROR;
-			netAgent_.accumulateReadException(new SqlException(
-															   netAgent_.logWriter_,
-															   new ClientMessageId(
-																				   SQLState.NET_EXCEPTION_ON_STREAMLEN_VERIFICATION),
-															   new Integer(parameterIndex),
-															   e.getMessage(),
-															   e));
+            netAgent_.accumulateReadException(new SqlException(
+                    netAgent_.logWriter_,
+                    new ClientMessageId(
+                        SQLState.NET_EXCEPTION_ON_STREAMLEN_VERIFICATION),
+                    parameterIndex, e.getMessage(), e));
 		}
         // Write the status byte to the send buffer.
         if (writeEXTDTAStatusByte) {
@@ -470,9 +470,7 @@ public class Request {
             final SqlException sqlex = 
                 new SqlException(netAgent_.logWriter_,
                                  new ClientMessageId(SQLState.NET_EXCEPTION_ON_READ),
-                                 new Integer(parameterIndex),
-                                 e.getMessage(),
-                                 e);
+                                 parameterIndex, e.getMessage(), e);
 
             netAgent_.accumulateReadException(sqlex);
             
@@ -960,7 +958,7 @@ public class Request {
                 protocolType = lidAndLengthOverrides[offset][0];
                 // lookup the protocolType in the protocolType->overrideLid map
                 // if an entry exists, replace the protocolType with the overrideLid
-                entry = map.get(new Integer(protocolType));
+                entry = map.get(protocolType);
                 overrideLid = (entry == null) ? protocolType : ((Integer) entry).intValue();
                 buffer.put((byte) overrideLid);
                 buffer.putShort((short) lidAndLengthOverrides[offset][1]);

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java?rev=1365468&r1=1365467&r2=1365468&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java Wed Jul 25 06:47:20 2012
@@ -142,8 +142,7 @@ public class ClientConnectionPoolDataSou
         // Disallow negative values.
         if (maxStatements < 0) {
             throw new IllegalArgumentException(msgUtil.getTextMessage(
-                    MessageId.CONN_NEGATIVE_MAXSTATEMENTS,
-                    new Integer(maxStatements)));
+                    MessageId.CONN_NEGATIVE_MAXSTATEMENTS, maxStatements));
         }
         this.maxStatements = maxStatements;
     }
@@ -175,8 +174,7 @@ public class ClientConnectionPoolDataSou
         // Make sure maxStatements is zero or higher.
         if (maxStatements < 0) {
             throw new IllegalArgumentException(msgUtil.getTextMessage(
-                    MessageId.CONN_NEGATIVE_MAXSTATEMENTS,
-                    new Integer(maxStatements)));
+                    MessageId.CONN_NEGATIVE_MAXSTATEMENTS, maxStatements));
         }
     }
 



Mime
View raw message