From c07d547331b2c6414afce10c6a59df8f3424f028 Mon Sep 17 00:00:00 2001 From: Pragathees Date: Mon, 2 Oct 2023 23:29:37 +0530 Subject: [PATCH] Fix for max() does not return negative Double #942 --- .../java/com/jayway/jsonpath/internal/function/numeric/Max.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-path/src/main/java/com/jayway/jsonpath/internal/function/numeric/Max.java b/json-path/src/main/java/com/jayway/jsonpath/internal/function/numeric/Max.java index 27570bf65..3bd6dca33 100644 --- a/json-path/src/main/java/com/jayway/jsonpath/internal/function/numeric/Max.java +++ b/json-path/src/main/java/com/jayway/jsonpath/internal/function/numeric/Max.java @@ -6,7 +6,7 @@ * Created by mattg on 6/26/15. */ public class Max extends AbstractAggregation { - private Double max = Double.MIN_VALUE; + private Double max = -1*Double.MAX_VALUE; @Override protected void next(Number value) {