db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1143443 - /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
Date Wed, 06 Jul 2011 14:44:00 GMT
Author: tfischer
Date: Wed Jul  6 14:44:00 2011
New Revision: 1143443

URL: http://svn.apache.org/viewvc?rev=1143443&view=rev
Log:
make findbugs happy for default values of Byte and Short columns

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java?rev=1143443&r1=1143442&r2=1143443&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
Wed Jul  6 14:44:00 2011
@@ -591,13 +591,13 @@ public class OMColumnTransformer
             {
                 // The following is better than casting with (short)
                 // because a range check is performed,
-                fieldDefaultValue = "new Short(\"" + defaultValue + "\")";
+                fieldDefaultValue = "Short.valueOf(\"" + defaultValue + "\")";
             }
             else if (JavaType.BYTE_OBJECT == javaType)
             {
                 // The following is better than casting with (byte)
                 // because a range check is performed,
-                fieldDefaultValue = "new Byte(\"" + defaultValue + "\")";
+                fieldDefaultValue = "Byte.valueOf(\"" + defaultValue + "\")";
             }
             else if (JavaType.INTEGER_OBJECT == javaType)
             {



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