From b139bc71876c013921c662a6471ad04c273312ef Mon Sep 17 00:00:00 2001 From: zouxxyy Date: Fri, 2 Feb 2024 11:21:43 +0800 Subject: [PATCH] update --- .../src/main/java/org/apache/paimon/utils/MathUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paimon-common/src/main/java/org/apache/paimon/utils/MathUtils.java b/paimon-common/src/main/java/org/apache/paimon/utils/MathUtils.java index 5a71a90c3786..c50646bd266e 100644 --- a/paimon-common/src/main/java/org/apache/paimon/utils/MathUtils.java +++ b/paimon-common/src/main/java/org/apache/paimon/utils/MathUtils.java @@ -95,10 +95,10 @@ public static Integer min(Integer v1, Integer v2) { } /** Safely increments the given int value by one, ensuring that no overflow occurs. */ - public static int incrementSafely(int value) { - if (value < Integer.MAX_VALUE) { - return value + 1; + public static int incrementSafely(int a) { + if (a == Integer.MAX_VALUE) { + return a; } - return value; + return a + 1; } }