File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/org/gridsuite/securityanalysis/server/repositories/specifications Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ private static <X> Specification<X> createNumberPredicate(Specification<X> speci
157157 if (splitValue .length > 1 ) {
158158 numberOfDecimalAfterDot = splitValue [1 ].length ();
159159 }
160- // tolerance is multiplied by 5 to simulate the fact that the database value is rounded (in the front, from the user viewpoint)
160+ // tolerance is multiplied by 0. 5 to simulate the fact that the database value is rounded (in the front, from the user viewpoint)
161161 // more than 13 decimal after dot will likely cause rounding errors due to double precision
162162 final double tolerance = Math .pow (10 , -numberOfDecimalAfterDot ) * 0.5 ;
163163 Double valueDouble = Double .valueOf (filterValue );
@@ -166,7 +166,7 @@ private static <X> Specification<X> createNumberPredicate(Specification<X> speci
166166 case LESS_THAN_OR_EQUAL ->
167167 specification .and (lessThanOrEqual (resourceFilter .column (), valueDouble , tolerance ));
168168 case GREATER_THAN_OR_EQUAL ->
169- specification .and (greaterThanOrEqual (resourceFilter .column (), valueDouble , 0.0 ));
169+ specification .and (greaterThanOrEqual (resourceFilter .column (), valueDouble , tolerance ));
170170 default ->
171171 throw new IllegalArgumentException ("The filter type " + resourceFilter .type () + " is not supported with the data type " + resourceFilter .dataType ());
172172 };
You can’t perform that action at this time.
0 commit comments