db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1447626 - /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
Date Tue, 19 Feb 2013 08:46:45 GMT
Author: tfischer
Date: Tue Feb 19 08:46:44 2013
New Revision: 1447626

URL: http://svn.apache.org/r1447626
Log:
Do not use copy-constructor for Boolean and Integer (fixes findbugs warning in generated code)

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=1447626&r1=1447625&r2=1447626&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
Tue Feb 19 08:46:44 2013
@@ -103,7 +103,7 @@ public final class TypeMap
     public static final String DECIMAL_OBJECT_TYPE
             = "new java.math.BigDecimal((double) 0)";
     /** A sample java object for BIT columns. */
-    public static final String BIT_OBJECT_TYPE = "new Boolean(true)";
+    public static final String BIT_OBJECT_TYPE = "Boolean.TRUE";
     /** A sample java object for TINYINT columns. */
     public static final String TINYINT_OBJECT_TYPE = "Byte.valueOf((byte) 0)";
     /** A sample java object for SMALLINT columns. */
@@ -135,7 +135,7 @@ public final class TypeMap
     /** A sample java object for BOOLEANCHAR columns. */
     public static final String BOOLEANCHAR_OBJECT_TYPE = "\"\"";
     /** A sample java object for BOOLEANINT columns. */
-    public static final String BOOLEANINT_OBJECT_TYPE = "new Integer(0)";
+    public static final String BOOLEANINT_OBJECT_TYPE = "Integer.valueOf(0)";
 
     /**
      * The mapping from schema type to the default initialisation value



---------------------------------------------------------------------
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