You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Haakon M (Jira)" <ji...@apache.org> on 2021/08/20 19:32:00 UTC
[jira] [Created] (COMPRESS-588) String comparison using == instead
of .equals() in SegmentConstantPoolArrayCache
Haakon M created COMPRESS-588:
---------------------------------
Summary: String comparison using == instead of .equals() in SegmentConstantPoolArrayCache
Key: COMPRESS-588
URL: https://issues.apache.org/jira/browse/COMPRESS-588
Project: Commons Compress
Issue Type: Bug
Affects Versions: 1.21
Environment: Veracode Static code analysis
Reporter: Haakon M
Hi
We use Commons Compress as a dependency in our application. Our static scan tool picked up a String comparison in SegmentConstantPoolArray:61 using == instead of .equals.
I had a quick look at the file in question, and it seems that you're trying to actually check if the two objects are the same, and so are using == in the correct manner. But I wasn't certain, so I'm making this issue anyways, just to be sure.
The file and line in question:
[https://gitbox.apache.org/repos/asf?p=commons-compress.git;a=blob;f=src/main/java/org/apache/commons/compress/harmony/unpack200/SegmentConstantPoolArrayCache.java;h=2f6a7f06f3fb8c8c57fd5875090c9624b767e681;hb=HEAD#l61]
Thanks
--
This message was sent by Atlassian Jira
(v8.3.4#803005)