incubator-vxquery-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r1390768 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/type/PromoteScalarEvaluatorFactory.java
Date Wed, 26 Sep 2012 23:04:27 GMT
Author: prestonc
Date: Wed Sep 26 23:04:26 2012
New Revision: 1390768

URL: http://svn.apache.org/viewvc?rev=1390768&view=rev
Log:
Missing default and return for basic case.

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

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/type/PromoteScalarEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/type/PromoteScalarEvaluatorFactory.java?rev=1390768&r1=1390767&r2=1390768&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/type/PromoteScalarEvaluatorFactory.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/type/PromoteScalarEvaluatorFactory.java
Wed Sep 26 23:04:26 2012
@@ -59,8 +59,9 @@ public class PromoteScalarEvaluatorFacto
                 abvs.reset();
                 int tid = tvp.getTag();
                 if (castToTag == -1 || castToTag == 0) {
-                    // No change.
+                    // The promote type is not supported. No change.
                     result.set(tvp);
+                    return;
                 } else if (castToTag > 0) {
                     try {
                         switch (tid) {
@@ -172,6 +173,10 @@ public class PromoteScalarEvaluatorFacto
                                 result.set(abvs.getByteArray(), abvs.getStartOffset(), abvs.getLength());
                                 return;
 
+                            default:
+                                // Promote type does not require us to change the value.
+                                result.set(tvp);
+                                return;
                         }
                     } catch (SystemException se) {
                         throw se;



Mime
View raw message