empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1387328 - /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java
Date Tue, 18 Sep 2012 19:13:13 GMT
Author: doebele
Date: Tue Sep 18 19:13:12 2012
New Revision: 1387328

URL: http://svn.apache.org/viewvc?rev=1387328&view=rev
Log:
EMPIREDB-157 
core: bugfix range validation (use long instead of int)

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java?rev=1387328&r1=1387327&r2=1387328&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java Tue Sep
18 19:13:12 2012
@@ -432,25 +432,25 @@ public class DBTableColumn extends DBCol
         Object max = getAttribute(DBColumn.DBCOLATTR_MAXVALUE);
         if (min!=null && max!=null)
         {   // Check Range
-            int minVal = ObjectUtils.getInteger(min);
-            int maxVal = ObjectUtils.getInteger(max);
-            if (n.intValue()<minVal || n.intValue()>maxVal)
+            long minVal = ObjectUtils.getLong(min);
+            long maxVal = ObjectUtils.getLong(max);
+            if (n.longValue()<minVal || n.longValue()>maxVal)
             {   // Out of Range
                 throw new FieldValueOutOfRangeException(this, minVal, maxVal);
             }
         }
         else if (min!=null)
         {   // Check Min Value
-            int minVal = ObjectUtils.getInteger(min);
-            if (n.intValue()<minVal)
+            long minVal = ObjectUtils.getLong(min);
+            if (n.longValue()<minVal)
             {   // Out of Range
                 throw new FieldValueOutOfRangeException(this, minVal, false);
             }
         }
         else if (max!=null)
         {   // Check Max Value
-            int maxVal = ObjectUtils.getInteger(max);
-            if (n.intValue()>maxVal)
+            long maxVal = ObjectUtils.getLong(max);
+            if (n.longValue()>maxVal)
             {   // Out of Range
                 throw new FieldValueOutOfRangeException(this, maxVal, true);
             }



Mime
View raw message