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 2014/04/02 02:21:34 UTC

[15/16] git commit: The if statement did not match the assignment order.

The if statement did not match the assignment order.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/6aad81ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/6aad81ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/6aad81ba

Branch: refs/heads/prestonc/hash_join
Commit: 6aad81ba0d2005f813e3804e3c2114f24f4bc5b5
Parents: c144950
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 17:08:38 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 17:08:38 2014 -0700

----------------------------------------------------------------------
 .../vxquery/datamodel/accessors/atomic/XSDecimalPointable.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/6aad81ba/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
index 0ebcd29..8aca4a0 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
@@ -70,9 +70,9 @@ public class XSDecimalPointable extends AbstractPointable implements IHashable,
         // TODO double check that precision is not being lost.
         int diff = p - op;
         if (diff > 0) {
-            v = Math.round(v / Math.pow(10, diff));
-        } else if (diff < 0) {
             ov = Math.round(ov / Math.pow(10, diff));
+        } else if (diff < 0) {
+            v = Math.round(v / Math.pow(10, diff));
         }
 
         return v < ov ? -1 : (v > ov ? 1 : 0);