db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1070065 - /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
Date Sat, 12 Feb 2011 12:57:53 GMT
Author: tfischer
Date: Sat Feb 12 12:57:53 2011
New Revision: 1070065

URL: http://svn.apache.org/viewvc?rev=1070065&view=rev
Log:
use valueOf methods instead of new methods as suggested by findbugs

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java?rev=1070065&r1=1070064&r2=1070065&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
Sat Feb 12 12:57:53 2011
@@ -97,10 +97,10 @@ public final class TypeMap
     public static final String DECIMAL_OBJECT_TYPE 
             = "new java.math.BigDecimal((double) 0)";
     public static final String BIT_OBJECT_TYPE = "new Boolean(true)";
-    public static final String TINYINT_OBJECT_TYPE = "new Byte((byte)0)";
-    public static final String SMALLINT_OBJECT_TYPE = "new Short((short)0)";
-    public static final String INTEGER_OBJECT_TYPE = "new Integer(0)";
-    public static final String BIGINT_OBJECT_TYPE = "new Long(0)";
+    public static final String TINYINT_OBJECT_TYPE = "Byte.valueOf((byte) 0)";
+    public static final String SMALLINT_OBJECT_TYPE = "Short.valueOf((short) 0)";
+    public static final String INTEGER_OBJECT_TYPE = "Integer.valueOf(0)";
+    public static final String BIGINT_OBJECT_TYPE = "Long.valueOf(0)";
     public static final String REAL_OBJECT_TYPE = "new Float(0)";
     public static final String FLOAT_OBJECT_TYPE = "new Double(0)";
     public static final String DOUBLE_OBJECT_TYPE = "new Double(0)";



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message