You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2012/09/27 01:04:27 UTC

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

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;