Skip to content
Browse files

fixed a comparator error in PipeHelper.compareObjects().

  • Loading branch information...
1 parent 9b01681 commit fdbf9da82b642708280410459d1f00b6468ad6b1 @okram okram committed Apr 17, 2012
View
4 src/main/java/com/tinkerpop/pipes/util/PipeHelper.java
@@ -134,11 +134,11 @@ public static boolean compareObjects(final FilterPipe.Filter filter, final Objec
case GREATER_THAN:
if (null == leftObject || rightObject == null)
return false;
- return ((Comparable) leftObject).compareTo(rightObject) == 1;
+ return ((Comparable) leftObject).compareTo(rightObject) >= 1;
case LESS_THAN:
if (null == leftObject || rightObject == null)
return false;
- return ((Comparable) leftObject).compareTo(rightObject) == -1;
+ return ((Comparable) leftObject).compareTo(rightObject) <= -1;
case GREATER_THAN_EQUAL:
if (null == leftObject || rightObject == null)
return false;
View
2 src/main/java/com/tinkerpop/pipes/util/PipesFluentPipeline.java
@@ -71,7 +71,7 @@
/**
* Add an IfThenElsePipe to the end of the Pipeline.
* If the ifFunction is true, then the results of the thenFunction are emitted.
- * If the ifFunction is true, then the results of the elseFunction are emitted.
+ * If the ifFunction is false, then the results of the elseFunction are emitted.
*
* @param ifFunction the function denoting the "if" part of the pipe
* @param thenFunction the function denoting the "then" part of the pipe

0 comments on commit fdbf9da

Please sign in to comment.
Something went wrong with that request. Please try again.