Skip to content

Commit d9081a6

Browse files
greaterThan
Signed-off-by: Mathieu DEHARBE <[email protected]>
1 parent 396d362 commit d9081a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/gridsuite/securityanalysis/server/repositories/specifications/SpecificationUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ public static <X> Specification<X> notEqual(String field, Double value, Double t
6060
Expression<Double> doubleExpression = getColumnPath(root, field).as(Double.class);
6161
/**
6262
* in order to be equal to doubleExpression, value has to fit :
63-
* value - tolerance <= doubleExpression < value + tolerance
63+
* value - tolerance <= doubleExpression <= value + tolerance
6464
* therefore in order to be different at least one of the opposite comparison needs to be true :
6565
*/
6666
return cb.or(
67-
cb.greaterThanOrEqualTo(doubleExpression, value + tolerance),
67+
cb.greaterThan(doubleExpression, value + tolerance),
6868
cb.lessThan(doubleExpression, value - tolerance)
6969
);
7070
};

0 commit comments

Comments
 (0)