From fbd68fbab5cf7357774dfd1b58112c0fa7e4446b Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 29 Oct 2023 08:15:21 -0400 Subject: [PATCH] Incorrect string comparison in unpack200.AttributeLayout.numBackwardsCallables() --- src/changes/changes.xml | 1 + .../commons/compress/harmony/unpack200/AttributeLayout.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index d805b925bc3..e393827d4a6 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -72,6 +72,7 @@ The type attribute can be add,update,fix,remove. Null-guard Lister.main(String[]) for programmatic invocation. NPE in pack200.NewAttributeBands.Reference.addAttributeToBand(NewAttribute, InputStream). Incorrect lazy initialization and update of static field in pack200.CodecEncoding.getSpecifier(Codec, Codec). + Incorrect string comparison in unpack200.AttributeLayout.numBackwardsCallables(). Bump org.slf4j:slf4j-api from 2.0.8 to 2.0.9 #413. Bump commons-io:commons-io from 2.13.0 to 2.15.0. diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java index 32b70022d38..0948b074a35 100644 --- a/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java +++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java @@ -382,7 +382,7 @@ public boolean matches(final long value) { } public int numBackwardsCallables() { - if (layout == "*") { + if ("*".equals(layout)) { return 1; } return backwardsCallCount;