From b7c7986b43a2b719978dc4b13c229d4f1fc9d6db Mon Sep 17 00:00:00 2001 From: Valentyn Kolesnikov Date: Thu, 24 Jul 2025 16:32:30 +0300 Subject: [PATCH] Resolved SonarQube warning --- src/main/java/com/github/underscore/Json.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/underscore/Json.java b/src/main/java/com/github/underscore/Json.java index 0486eb86..0057886c 100644 --- a/src/main/java/com/github/underscore/Json.java +++ b/src/main/java/com/github/underscore/Json.java @@ -770,7 +770,7 @@ private void pauseCapture() { private String endCapture() { int end = current == -1 ? index : index - 1; String captured; - if (captureBuffer.length() > 0) { + if (!captureBuffer.isEmpty()) { captureBuffer.append(json, captureStart, end); captured = captureBuffer.toString(); captureBuffer.setLength(0);