incubator-vxquery-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r1382212 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/AbstractNumericScalarEvaluatorFactory.java
Date Fri, 07 Sep 2012 23:52:05 GMT
Author: prestonc
Date: Fri Sep  7 23:52:04 2012
New Revision: 1382212

URL: http://svn.apache.org/viewvc?rev=1382212&view=rev
Log:
A simplier way to return an empty sequence.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/AbstractNumericScalarEvaluatorFactory.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/AbstractNumericScalarEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/AbstractNumericScalarEvaluatorFactory.java?rev=1382212&r1=1382211&r2=1382212&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/AbstractNumericScalarEvaluatorFactory.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/AbstractNumericScalarEvaluatorFactory.java
Fri Sep  7 23:52:04 2012
@@ -23,6 +23,7 @@ import org.apache.vxquery.datamodel.acce
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
 import org.apache.vxquery.datamodel.accessors.atomic.XSDecimalPointable;
 import org.apache.vxquery.datamodel.values.ValueTag;
+import org.apache.vxquery.datamodel.values.XDMConstants;
 import org.apache.vxquery.exceptions.ErrorCode;
 import org.apache.vxquery.exceptions.SystemException;
 import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator;
@@ -70,8 +71,7 @@ public abstract class AbstractNumericSca
                         case ValueTag.SEQUENCE_TAG:
                             tvp.getValue(tp.seqp);
                             if (tp.seqp.getEntryCount() == 0) {
-                                dOut.write(ValueTag.SEQUENCE_TAG);
-                                dOut.write(tp.seqp.getByteArray(), tp.seqp.getStartOffset(),
tp.seqp.getLength());
+                                XDMConstants.setEmptySequence(result);
                                 return;
                             }
 



Mime
View raw message