db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lily...@apache.org
Subject svn commit: r1072457 - in /db/derby/code/trunk/java: drda/org/apache/derby/drda/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/iapi/services/info/ engine/org/apache/derby/iapi/types/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby...
Date Sat, 19 Feb 2011 22:58:54 GMT
Author: lilywei
Date: Sat Feb 19 22:58:54 2011
New Revision: 1072457

URL: http://svn.apache.org/viewvc?rev=1072457&view=rev
Log:
DERBY-5053 reduce superfluous boxing histrionics

Patch contributed by Dave Brosius <dbrosius@apache.org>

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDouble.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLInteger.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLReal.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/master/MasterController.java
    db/derby/code/trunk/java/engine/org/apache/derby/vti/StringColumnVTI.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java Sat Feb 19 22:58:54
2011
@@ -89,7 +89,7 @@ public class NetServlet extends HttpServ
 				
 		String port = config.getInitParameter("portNumber");
 		if (port != null) {
-			int p = Integer.valueOf(port).intValue();
+			int p = Integer.parseInt(port);
 			if (p > 0)
 				portNumber = p;
 		}

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Sat Feb 19
22:58:54 2011
@@ -5341,7 +5341,7 @@ class DRDAConnThread extends Thread {
 
                         if (sqlStmt.startsWith(TIMEOUT_STATEMENT)) {
                             String timeoutString = sqlStmt.substring(TIMEOUT_STATEMENT.length());
-                            pendingStatementTimeout = Integer.valueOf(timeoutString).intValue();
+                            pendingStatementTimeout = Integer.parseInt(timeoutString);
                             break;
                         }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java Sat Feb
19 22:58:54 2011
@@ -134,7 +134,7 @@ public abstract class JVMInfo
 
 				try {
 
-					if (Float.valueOf(javaVersion).floatValue() > 1.6f)
+					if (Float.parseFloat(javaVersion) > 1.6f)
 						id = J2SE_16;
 				} catch (NumberFormatException nfe) {
 				}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDouble.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDouble.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDouble.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDouble.java Sat Feb 19
22:58:54 2011
@@ -395,7 +395,7 @@ public final class SQLDouble extends Num
 			double doubleValue = 0;
 		    try {
                 // ??? jsk: rounding???
-		        doubleValue = Double.valueOf(theValue.trim()).doubleValue();
+		        doubleValue = Double.parseDouble(theValue.trim());
 			} catch (NumberFormatException nfe) {
 			    throw invalidFormat();
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLInteger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLInteger.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLInteger.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLInteger.java Sat Feb 19
22:58:54 2011
@@ -320,7 +320,7 @@ public final class SQLInteger
 		else
 		{
 		    try {
-		        value = Integer.valueOf(theValue.trim()).intValue();
+		        value = Integer.parseInt(theValue.trim());
 			} catch (NumberFormatException nfe) {
 			    throw invalidFormat();
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLReal.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLReal.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLReal.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLReal.java Sat Feb 19 22:58:54
2011
@@ -384,7 +384,7 @@ public final class SQLReal
             // what if String is rouned to zero?
             //System.out.println("SQLReal.setValue(String) - rounding issue?"+theValue);
 		    try {
-		        setValue(Double.valueOf(theValue.trim()).doubleValue());
+		        setValue(Double.parseDouble(theValue.trim()));
 			} catch (NumberFormatException nfe) {
 			    throw invalidFormat();
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Sat Feb
19 22:58:54 2011
@@ -911,7 +911,7 @@ public abstract class EmbedConnection im
             p.getProperty(Attribute.REPLICATION_SLAVE_PORT);
         int slaveport = -1; // slaveport < 0 will use the default port
         if (portString != null) {
-            slaveport = Integer.valueOf(portString).intValue();
+            slaveport = Integer.parseInt(portString);
         }
 
         tr.getDatabase().startReplicationMaster(getTR().getDBName(),

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java Sat
Feb 19 22:58:54 2011
@@ -776,7 +776,7 @@ public class FromBaseTable extends FromT
 			{
 				try
 				{
-					loadFactor = Float.valueOf(value).floatValue();
+					loadFactor = Float.parseFloat(value);
 				}
 				catch (NumberFormatException nfe)
 				{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java Sat Feb
19 22:58:54 2011
@@ -461,7 +461,7 @@ abstract class FromTable extends ResultS
 			{
 				try
 				{
-					loadFactor = Float.valueOf(value).floatValue();
+					loadFactor = Float.parseFloat(value);
 				}
 				catch (NumberFormatException nfe)
 				{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java Sat
Feb 19 22:58:54 2011
@@ -4651,7 +4651,7 @@ public final class LogToFile implements 
 			String TestPartialLogWrite = PropertyUtil.getSystemProperty(TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES);
 			if (TestPartialLogWrite != null)
 			{
-				bytesToWrite = Integer.valueOf(TestPartialLogWrite).intValue();
+				bytesToWrite = Integer.parseInt(TestPartialLogWrite);
 			}
 
 			Monitor.logMessage("TEST_LOG_INCOMPLETE_LOG_WRITE: writing " + bytesToWrite + 
@@ -4786,7 +4786,7 @@ public final class LogToFile implements 
 			{
 				String RecordToFillLog = PropertyUtil.getSystemProperty(TEST_RECORD_TO_FILL_LOG);
 				if (RecordToFillLog != null)
-					test_numRecordToFillLog = Integer.valueOf(RecordToFillLog).intValue();
+					test_numRecordToFillLog = Integer.parseInt(RecordToFillLog);
 				else
 					test_numRecordToFillLog = 100;
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/master/MasterController.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/master/MasterController.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/master/MasterController.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/master/MasterController.java
Sat Feb 19 22:58:54 2011
@@ -204,8 +204,7 @@ public class MasterController 
         }
 
         try {
-            slaveAddr = new SlaveAddress(slavehost, 
-                    (new Integer(slaveport)).intValue());
+            slaveAddr = new SlaveAddress(slavehost, slaveport);
         } catch (UnknownHostException uhe) {
             throw StandardException.newException
                     (SQLState.REPLICATION_CONNECTION_EXCEPTION, uhe, 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/vti/StringColumnVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/vti/StringColumnVTI.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/vti/StringColumnVTI.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/vti/StringColumnVTI.java Sat Feb 19 22:58:54
2011
@@ -195,7 +195,7 @@ public  abstract    class   StringColumn
         else
         {
             try {
-                return Integer.valueOf( columnValue ).intValue();
+                return Integer.parseInt( columnValue );
             } catch (NumberFormatException e) { throw wrap( e ); }
         }
     }
@@ -221,7 +221,7 @@ public  abstract    class   StringColumn
         else
         {
             try {
-                return Float.valueOf( columnValue ).floatValue();
+                return Float.parseFloat( columnValue );
             } catch (NumberFormatException e) { throw wrap( e ); }
         }
     }
@@ -234,7 +234,7 @@ public  abstract    class   StringColumn
         else
         {
             try {
-                return Double.valueOf( columnValue ).doubleValue();
+                return Double.parseDouble( columnValue );
             } catch (NumberFormatException e) { throw wrap( e ); }
         }
     }

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java Sat Feb 19
22:58:54 2011
@@ -468,9 +468,9 @@ public static void getMainInfo (java.io.
                                                                    localeName));
 
 
-			int major = Integer.valueOf(p.getProperty ("derby.locale.version.major")).intValue();
-			int minor = Integer.valueOf(p.getProperty ("derby.locale.version.minor")).intValue();
-			int maint = Integer.valueOf(p.getProperty ("derby.locale.version.maint")).intValue();
+			int major = Integer.parseInt(p.getProperty ("derby.locale.version.major"));
+			int minor = Integer.parseInt(p.getProperty ("derby.locale.version.minor"));
+			int maint = Integer.parseInt(p.getProperty ("derby.locale.version.maint"));
 			String build = p.getProperty ("derby.locale.build.number");
 
 			String lv = ProductVersionHolder.fullVersionString(major, minor, maint, false, build);

Modified: db/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java?rev=1072457&r1=1072456&r2=1072457&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java Sat Feb 19 22:58:54
2011
@@ -676,7 +676,7 @@ public final class dblook {
 			}
 			try {
 				String colName = getColNameFromNumber(tableId,
-					(Integer.valueOf(tok)).intValue());
+					(Integer.parseInt(tok)));
 				if (!firstCol)
 					sb.append(", ");
 				sb.append(colName);



Mime
View raw message