openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1030156 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: kernel/ meta/ meta/strats/ schema/ sql/
Date Tue, 02 Nov 2010 18:24:13 GMT
Author: curtisr7
Date: Tue Nov  2 18:24:12 2010
New Revision: 1030156

URL: http://svn.apache.org/viewvc?rev=1030156&view=rev
Log:
OPENJPA-1868: Miscellaneous FindBugs suggested performance improvements for openjpa-jdbc.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/JavaSQLTypes.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EnumValueHandler.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/PrimitiveWrapperArrays.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java
Tue Nov  2 18:24:12 2010
@@ -146,8 +146,7 @@ public class JDBCFetchConfigurationImpl
             && mode != EagerFetchModes.EAGER_NONE
             && mode != EagerFetchModes.EAGER_JOIN
             && mode != EagerFetchModes.EAGER_PARALLEL)
-            throw new IllegalArgumentException(
-                _loc.get("bad-fetch-mode", new Integer(mode)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-fetch-mode", Integer.valueOf(mode)).getMessage());
 
         if (mode == DEFAULT) {
             JDBCConfiguration conf = getJDBCConfiguration();
@@ -177,8 +176,7 @@ public class JDBCFetchConfigurationImpl
             && mode != EagerFetchModes.EAGER_NONE
             && mode != EagerFetchModes.EAGER_JOIN
             && mode != EagerFetchModes.EAGER_PARALLEL)
-            throw new IllegalArgumentException(
-                _loc.get("bad-fetch-mode", new Integer(mode)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-fetch-mode", Integer.valueOf(mode)).getMessage());
 
         if (mode == DEFAULT) {
             JDBCConfiguration conf = getJDBCConfiguration();
@@ -199,8 +197,7 @@ public class JDBCFetchConfigurationImpl
             && type != ResultSet.TYPE_FORWARD_ONLY
             && type != ResultSet.TYPE_SCROLL_INSENSITIVE
             && type != ResultSet.TYPE_SCROLL_SENSITIVE)
-            throw new IllegalArgumentException(_loc.get("bad-resultset-type",
-                new Integer(type)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-resultset-type", Integer.valueOf(type)).getMessage());
 
         if (type == DEFAULT) {
             JDBCConfiguration conf = getJDBCConfiguration();
@@ -220,8 +217,7 @@ public class JDBCFetchConfigurationImpl
             && direction != ResultSet.FETCH_FORWARD
             && direction != ResultSet.FETCH_REVERSE
             && direction != ResultSet.FETCH_UNKNOWN)
-            throw new IllegalArgumentException(_loc.get("bad-fetch-direction",
-                new Integer(direction)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-fetch-direction", Integer.valueOf(direction)).getMessage());
 
         if (direction == DEFAULT) {
             JDBCConfiguration conf = getJDBCConfiguration();
@@ -241,8 +237,7 @@ public class JDBCFetchConfigurationImpl
             && size != LRSSizes.SIZE_QUERY
             && size != LRSSizes.SIZE_LAST
             && size != LRSSizes.SIZE_UNKNOWN)
-            throw new IllegalArgumentException(
-                _loc.get("bad-lrs-size", new Integer(size)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-lrs-size", Integer.valueOf(size)).getMessage());
 
         if (size == DEFAULT) {
             JDBCConfiguration conf = getJDBCConfiguration();
@@ -262,8 +257,7 @@ public class JDBCFetchConfigurationImpl
             && syntax != JoinSyntaxes.SYNTAX_SQL92
             && syntax != JoinSyntaxes.SYNTAX_TRADITIONAL
             && syntax != JoinSyntaxes.SYNTAX_DATABASE)
-            throw new IllegalArgumentException(
-                _loc.get("bad-join-syntax", new Integer(syntax)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-join-syntax", Integer.valueOf(syntax)).getMessage());
 
         if (syntax == DEFAULT) {
             JDBCConfiguration conf = getJDBCConfiguration();
@@ -383,8 +377,7 @@ public class JDBCFetchConfigurationImpl
             && level != Connection.TRANSACTION_READ_COMMITTED
             && level != Connection.TRANSACTION_REPEATABLE_READ
             && level != Connection.TRANSACTION_SERIALIZABLE)
-            throw new IllegalArgumentException(
-                _loc.get("bad-level", new Integer(level)).getMessage());
+            throw new IllegalArgumentException(_loc.get("bad-level", Integer.valueOf(level)).getMessage());
 
         if (level == DEFAULT)
             _state.isolationLevel = -1;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
Tue Nov  2 18:24:12 2010
@@ -944,13 +944,13 @@ public class JDBCStoreQuery 
         Object val = getValue(absVal.getValue(), ob, params, sm);
         Class c = val.getClass();
         if (c == Integer.class)
-            return new Integer(java.lang.Math.abs(((Integer) val).intValue()));
+            return Integer.valueOf(java.lang.Math.abs(((Integer) val).intValue()));
         else if (c == Float.class)
-            return new Float(java.lang.Math.abs(((Float) val).floatValue()));
+            return Float.valueOf(java.lang.Math.abs(((Float) val).floatValue()));
         else if (c == Double.class)
-            return new Double(java.lang.Math.abs(((Double) val).doubleValue()));
+            return Double.valueOf(java.lang.Math.abs(((Double) val).doubleValue()));
         else if (c == Long.class)
-            return new Long(java.lang.Math.abs(((Long) val).longValue()));
+            return Long.valueOf(java.lang.Math.abs(((Long) val).longValue()));
         throw new UnsupportedException();
     }
 
@@ -961,15 +961,13 @@ public class JDBCStoreQuery 
         Object val = getValue(sqrtVal.getValue(), ob, params, sm);
         Class c = val.getClass();
         if (c == Integer.class)
-            return new Double(java.lang.Math.sqrt(((Integer) val).
-                doubleValue()));
+            return Double.valueOf(java.lang.Math.sqrt(((Integer) val).doubleValue()));
         else if (c == Float.class)
-            return new Double(java.lang.Math.sqrt(((Float) val).floatValue()));
+            return Double.valueOf(java.lang.Math.sqrt(((Float) val).floatValue()));
         else if (c == Double.class)
-            return new Double(java.lang.Math.sqrt(((Double) val).
-                doubleValue()));
+            return Double.valueOf(java.lang.Math.sqrt(((Double) val).doubleValue()));
         else if (c == Long.class)
-            return new Double(java.lang.Math.sqrt(((Long) val).doubleValue()));
+            return Double.valueOf(java.lang.Math.sqrt(((Long) val).doubleValue()));
         throw new UnsupportedException();
     }    
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
Tue Nov  2 18:24:12 2010
@@ -178,7 +178,7 @@ public class ClassMappingInfo
     public DBIdentifier[] getSecondaryTableIdentifiers() {
         if (_seconds == null)
             return new DBIdentifier[0];
-        return (DBIdentifier[]) _seconds.keySet().toArray(new DBIdentifier[]{ });
+        return (DBIdentifier[]) _seconds.keySet().toArray(new DBIdentifier[_seconds.size()]);
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java
Tue Nov  2 18:24:12 2010
@@ -73,7 +73,7 @@ public class DiscriminatorMappingInfo
             case JavaTypes.INT:
                 return Integer.valueOf(_value);
             case JavaTypes.CHAR:
-               return new Character(_value.charAt(_value.indexOf('\'')+1));
+               return Character.valueOf(_value.charAt(_value.indexOf('\'')+1));
             case JavaTypes.STRING:
             default: 
                 return _value;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/JavaSQLTypes.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/JavaSQLTypes.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/JavaSQLTypes.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/JavaSQLTypes.java
Tue Nov  2 18:24:12 2010
@@ -49,18 +49,18 @@ public class JavaSQLTypes
     public static final int TIMESTAMP = 1011;
     public static final int JDBC_DEFAULT = 1012;
 
-    private static final Byte ZERO_BYTE = new Byte((byte) 0);
-    private static final Character ZERO_CHAR = new Character((char) 0);
-    private static final Double ZERO_DOUBLE = new Double(0d);
-    private static final Float ZERO_FLOAT = new Float(0f);
-    private static final Short ZERO_SHORT = new Short((short) 0);
+    private static final Byte ZERO_BYTE = Byte.valueOf((byte) 0);
+    private static final Character ZERO_CHAR = Character.valueOf((char) 0);
+    private static final Double ZERO_DOUBLE = Double.valueOf(0d);
+    private static final Float ZERO_FLOAT = Float.valueOf(0f);
+    private static final Short ZERO_SHORT = Short.valueOf((short) 0);
     private static final BigDecimal ZERO_BIGDECIMAL = new BigDecimal(0d);
 
     private static final Byte NONZERO_BYTE = new Byte((byte) 1);
-    private static final Character NONZERO_CHAR = new Character((char) 'a');
-    private static final Double NONZERO_DOUBLE = new Double(1d);
-    private static final Float NONZERO_FLOAT = new Float(1f);
-    private static final Short NONZERO_SHORT = new Short((short) 1);
+    private static final Character NONZERO_CHAR = Character.valueOf((char) 'a');
+    private static final Double NONZERO_DOUBLE = Double.valueOf(1d);
+    private static final Float NONZERO_FLOAT = Float.valueOf(1f);
+    private static final Short NONZERO_SHORT = Short.valueOf((short) 1);
     private static final BigInteger NONZERO_BIGINTEGER = new BigInteger("1");
     private static final BigDecimal NONZERO_BIGDECIMAL = new BigDecimal(1d);
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java
Tue Nov  2 18:24:12 2010
@@ -553,9 +553,9 @@ public class MappingDefaultsImpl
         
         switch (disc.getJavaType()) {
             case JavaTypes.INT:
-                return new Integer(alias.hashCode());
+                return Integer.valueOf(alias.hashCode());
             case JavaTypes.CHAR:
-                return new Character(alias.charAt(0)); 
+                return Character.valueOf(alias.charAt(0)); 
             case JavaTypes.STRING:
             default:
                 return alias;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EnumValueHandler.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EnumValueHandler.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EnumValueHandler.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EnumValueHandler.java
Tue Nov  2 18:24:12 2010
@@ -106,7 +106,7 @@ public class EnumValueHandler
         if (val == null)
             return null;
         if (_ordinal)
-            return new Integer(((Enum) val).ordinal());
+            return Integer.valueOf(((Enum) val).ordinal());
         return ((Enum) val).name();
     }
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/PrimitiveWrapperArrays.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/PrimitiveWrapperArrays.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/PrimitiveWrapperArrays.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/PrimitiveWrapperArrays.java
Tue Nov  2 18:24:12 2010
@@ -36,7 +36,7 @@ class PrimitiveWrapperArrays {
         if (vm.getType().getComponentType() == Character.class) {
             Character[] objectArray = new Character[array.length];
             for (int i = 0; i < array.length; i++)
-                objectArray[i] = new Character(array[i]);
+                objectArray[i] = Character.valueOf(array[i]);
             return objectArray;
         }
         return array;
@@ -65,7 +65,7 @@ class PrimitiveWrapperArrays {
         if (vm.getType().getComponentType() == Byte.class) {
             Byte[] objectArray = new Byte[array.length];
             for (int i = 0; i < array.length; i++)
-                objectArray[i] = new Byte(array[i]);
+                objectArray[i] = Byte.valueOf(array[i]);
             return objectArray;
         }
         return array;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java Tue
Nov  2 18:24:12 2010
@@ -415,7 +415,7 @@ public class Column
                 break;
             case JavaTypes.CHAR:
             case JavaTypes.CHAR_OBJ:
-                _default = new Character(_defaultStr.charAt(0));
+                _default = Character.valueOf(_defaultStr.charAt(0));
                 break;
             case JavaTypes.DOUBLE:
             case JavaTypes.DOUBLE_OBJ:

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Tue Nov  2 18:24:12 2010
@@ -536,10 +536,10 @@ public class DBDictionary
             return getBigDecimal(rs, column);
         } catch (Exception e1) {
             try {
-                return new Double(getDouble(rs, column));
+                return Double.valueOf(getDouble(rs, column));
             } catch (Exception e2) {
                 try {
-                    return new Float(getFloat(rs, column));
+                    return Float.valueOf(getFloat(rs, column));
                 } catch (Exception e3) {
                     try {
                         return getLong(rs, column);
@@ -4742,7 +4742,7 @@ public class DBDictionary
                 timeout = 0;
             } else if (timeout < 0) {
                 if (log.isWarnEnabled())
-                    log.warn(_loc.get("invalid-timeout", new Integer(timeout)));
+                    log.warn(_loc.get("invalid-timeout", Integer.valueOf(timeout)));
                 return;
             } else if (timeout > 0 && timeout < 1000) {
                 // round up to 1 sec

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Tue Nov  2 18:24:12 2010
@@ -517,7 +517,7 @@ public class OracleDictionary
                         new Class[]{ int.class, short.class }).
                         invoke(inner,
                             new Object[]{
-                                new Integer(idx),
+                                Integer.valueOf(idx),
                                 Class.forName
                                     ("oracle.jdbc.OraclePreparedStatement").
                                     getField("FORM_NCHAR").get(null)

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java Tue
Nov  2 18:24:12 2010
@@ -350,7 +350,7 @@ public final class SQLBuffer
      * Append a parameter value.
      */
     public SQLBuffer appendValue(byte b, Column col) {
-        return appendValue(new Byte(b), col);
+        return appendValue(Byte.valueOf(b), col);
     }
 
     /**
@@ -364,7 +364,7 @@ public final class SQLBuffer
      * Append a parameter value.
      */
     public SQLBuffer appendValue(char c, Column col) {
-        return appendValue(new Character(c), col);
+        return appendValue(Character.valueOf(c), col);
     }
 
     /**
@@ -378,7 +378,7 @@ public final class SQLBuffer
      * Append a parameter value.
      */
     public SQLBuffer appendValue(double d, Column col) {
-        return appendValue(new Double(d), col);
+        return appendValue(Double.valueOf(d), col);
     }
 
     /**
@@ -392,7 +392,7 @@ public final class SQLBuffer
      * Append a parameter value.
      */
     public SQLBuffer appendValue(float f, Column col) {
-        return appendValue(new Float(f), col);
+        return appendValue(Float.valueOf(f), col);
     }
 
     /**
@@ -434,7 +434,7 @@ public final class SQLBuffer
      * Append a parameter value.
      */
     public SQLBuffer appendValue(short s, Column col) {
-        return appendValue(new Short(s), col);
+        return appendValue(Short.valueOf(s), col);
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java?rev=1030156&r1=1030155&r2=1030156&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java
Tue Nov  2 18:24:12 2010
@@ -432,11 +432,11 @@ public class SolidDBDictionary
             break;
         case JavaTypes.FLOAT:
         case JavaTypes.FLOAT_OBJ:
-            setFloat(stmnt, idx, new Double(val).floatValue(), col);
+            setFloat(stmnt, idx, Double.valueOf(val).floatValue(), col);
             break;
         case JavaTypes.LONG:
         case JavaTypes.LONG_OBJ:
-            setLong(stmnt, idx, new Double(val).longValue(), col);
+            setLong(stmnt, idx, Double.valueOf(val).longValue(), col);
             break;
         }
     }



Mime
View raw message