From 380806c701adcb54e9c5ffe18f27cee9f24563ca Mon Sep 17 00:00:00 2001 From: emeroad Date: Tue, 15 Oct 2024 11:35:51 +0900 Subject: [PATCH] [#noissue] Fix AvoidBranchingStatementAsLastInLoop of Spotbugs --- .../com/navercorp/pinpoint/common/util/ContentLength.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commons/src/main/java/com/navercorp/pinpoint/common/util/ContentLength.java b/commons/src/main/java/com/navercorp/pinpoint/common/util/ContentLength.java index 9a0162070aef..94d09c2c9de5 100644 --- a/commons/src/main/java/com/navercorp/pinpoint/common/util/ContentLength.java +++ b/commons/src/main/java/com/navercorp/pinpoint/common/util/ContentLength.java @@ -38,10 +38,9 @@ public long getLongLength(Object content) { } for (LengthFunction function : functions) { long length = function.getLength(content); - if (length == SKIP) { - continue; + if (length != SKIP) { + return length; } - return length; } return NOT_EXIST; }