You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "griffinjm (via GitHub)" <gi...@apache.org> on 2026/03/19 20:36:20 UTC

Re: [PR] [COLLECTIONS-885] PatriciaTrie. Prevent silent mutations, prevents CMEs when iterating. [commons-collections]

griffinjm commented on code in PR #672:
URL: https://github.com/apache/commons-collections/pull/672#discussion_r2962572060


##########
src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java:
##########
@@ -169,9 +169,9 @@ final K castKey(final Object key) {
     }
 
     /**
-     * A utility method for calling {@link KeyAnalyzer#compare(Object, Object)}
+     * A null-safe utility method for calling {@link KeyAnalyzer#compare(Object, Object)}
      */
-    final boolean compareKeys(final K key, final K other) {
+    final boolean keysAreEqual(final K key, final K other) {

Review Comment:
   Renamed as this method name is a little misleading, it's actually checking that the keys are equal, in a null-safe manner, returning a boolean, not an int as you would expect.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org