You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/08/31 22:47:45 UTC
[4/5] incubator-tinkerpop git commit: CHANGELOG update and JavaDoc
fixes for @mhfrantz Compare BigDecimal fix.
CHANGELOG update and JavaDoc fixes for @mhfrantz Compare BigDecimal fix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/2ffde6c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2ffde6c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2ffde6c4
Branch: refs/heads/master
Commit: 2ffde6c4c5ffc743d155ee3ba132988e5cfe964d
Parents: 0a11ae1
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Aug 31 14:46:03 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Aug 31 14:46:03 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../gremlin/process/traversal/Compare.java | 20 ++++++++++----------
2 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2ffde6c4/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4ee6bd6..d20c2fc 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::http://www.tinkerpop.com/docs/current/images/gremlin-hindu.png[width=225]
TinkerPop 3.0.1 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* `Compare` now uses `BigDecimal` internally to ensure that precision is not lost on standard number comparisons.
* Renamed `ComputerVerificationStrategy` to `VerificationStrategy` so all the verification strategies can use it.
* Added `StandardVerificationStrategy` that throws exceptions for illegal traversal patterns on the standard engine (which extends to `GraphComputer`).
* Clarified semantics of `Transaction.close()` in unit tests - now refers only to closing the current transaction in the current thread.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2ffde6c4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Compare.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Compare.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Compare.java
index 262347f..97b52b8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Compare.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Compare.java
@@ -33,7 +33,7 @@ public enum Compare implements BiPredicate<Object, Object> {
/**
* Evaluates if the first object is equal to the second. If both are of type {@link Number} but not of the
* same class (i.e. double for the first object and long for the second object) both values are converted to
- * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo()}. Otherwise they are evaluated
+ * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo}. Otherwise they are evaluated
* via {@link Object#equals(Object)}. Testing against {@link Number#doubleValue()} enables the compare
* operations to be a bit more forgiving with respect to comparing different number types.
*/
@@ -58,7 +58,7 @@ public enum Compare implements BiPredicate<Object, Object> {
/**
* Evaluates if the first object is not equal to the second. If both are of type {@link Number} but not of the
* same class (i.e. double for the first object and long for the second object) both values are converted to
- * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#equals()}. Otherwise they are evaluated
+ * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#equals}. Otherwise they are evaluated
* via {@link Object#equals(Object)}. Testing against {@link Number#doubleValue()} enables the compare
* operations to be a bit more forgiving with respect to comparing different number types.
*/
@@ -80,8 +80,8 @@ public enum Compare implements BiPredicate<Object, Object> {
/**
* Evaluates if the first object is greater than the second. If both are of type {@link Number} but not of the
* same class (i.e. double for the first object and long for the second object) both values are converted to
- * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo()}. Otherwise they are evaluated
- * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo()} enables the compare
+ * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo}. Otherwise they are evaluated
+ * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo} enables the compare
* operations to be a bit more forgiving with respect to comparing different number types.
*/
gt {
@@ -105,8 +105,8 @@ public enum Compare implements BiPredicate<Object, Object> {
/**
* Evaluates if the first object is greater-equal to the second. If both are of type {@link Number} but not of the
* same class (i.e. double for the first object and long for the second object) both values are converted to
- * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo()}. Otherwise they are evaluated
- * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo()} enables the compare
+ * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo}. Otherwise they are evaluated
+ * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo} enables the compare
* operations to be a bit more forgiving with respect to comparing different number types.
*/
gte {
@@ -127,8 +127,8 @@ public enum Compare implements BiPredicate<Object, Object> {
/**
* Evaluates if the first object is less than the second. If both are of type {@link Number} but not of the
* same class (i.e. double for the first object and long for the second object) both values are converted to
- * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo()}. Otherwise they are evaluated
- * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo()} enables the compare
+ * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo}. Otherwise they are evaluated
+ * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo} enables the compare
* operations to be a bit more forgiving with respect to comparing different number types.
*/
lt {
@@ -152,8 +152,8 @@ public enum Compare implements BiPredicate<Object, Object> {
/**
* Evaluates if the first object is less-equal to the second. If both are of type {@link Number} but not of the
* same class (i.e. double for the first object and long for the second object) both values are converted to
- * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo()}. Otherwise they are evaluated
- * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo()} enables the compare
+ * {@link BigDecimal} so that it can be evaluated via {@link BigDecimal#compareTo}. Otherwise they are evaluated
+ * via {@link Comparable#compareTo(Object)}. Testing against {@link BigDecimal#compareTo} enables the compare
* operations to be a bit more forgiving with respect to comparing different number types.
*/
lte {