From f2c203114cdead9cac637bec411d26351d80eacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E6=98=A5=E4=BA=AE?= <946240095@qq.com> Date: Wed, 8 May 2024 20:11:20 +0800 Subject: [PATCH] fix PR comment problem --- .../transform/process/operator/OperatorTools.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/operator/OperatorTools.java b/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/operator/OperatorTools.java index 21c5353f400..14e7c20d4ba 100644 --- a/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/operator/OperatorTools.java +++ b/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/operator/OperatorTools.java @@ -145,15 +145,10 @@ public static BigDecimal parseBigDecimal(Object value) { @SuppressWarnings("rawtypes") public static int compareValue(Comparable left, Comparable right) { if (left == null) { - if (right == null) { - return 0; - } else { - return -1; - } - } else { - if (right == null) { - return 1; - } + return right == null ? 0 : -1; + } + if (right == null) { + return 1; } if (left instanceof String) { if (right instanceof String) {