incubator-vxquery-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r1382210 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
Date Fri, 07 Sep 2012 23:49:46 GMT
Author: prestonc
Date: Fri Sep  7 23:49:45 2012
New Revision: 1382210

URL: http://svn.apache.org/viewvc?rev=1382210&view=rev
Log:
Found an error when reading integer values that are too large.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java?rev=1382210&r1=1382209&r2=1382210&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
Fri Sep  7 23:49:45 2012
@@ -1245,7 +1245,11 @@ public class XMLQueryTranslator {
                 break;
             case INTEGER:
                 t = SequenceType.create(BuiltinTypeRegistry.XS_INTEGER, Quantifier.QUANT_ONE);
-                value = Long.parseLong(image);
+                try {
+                    value = Long.parseLong(image);
+                } catch (NumberFormatException nfe) {
+                    throw new SystemException(ErrorCode.FOAR0002);
+                }
                 break;
             case STRING:
                 t = SequenceType.create(BuiltinTypeRegistry.XS_STRING, Quantifier.QUANT_ONE);



Mime
View raw message