ajantha-bhat commented on code in PR #9419: URL: https://github.com/apache/iceberg/pull/9419#discussion_r1442771024
########## api/src/main/java/org/apache/iceberg/util/CharSequenceSet.java: ########## @@ -166,6 +166,7 @@ public void clear() { wrapperSet.clear(); } + @SuppressWarnings("CollectionUndefinedEquality") Review Comment: `containsAll` uses `CharSequenceWrapper` for equals to ensure consistent hashing and equals behaviour similar to `CharSequenceMap` (javadoc of `CharSequenceMap` explains it). But the tool is unable to figure it out I guess. Hence, suppressing here and below two places. ########## api/src/main/java/org/apache/iceberg/util/CharSequenceWrapper.java: ########## @@ -54,7 +54,7 @@ public boolean equals(Object other) { CharSequenceWrapper that = (CharSequenceWrapper) other; if (wrapped instanceof String && that.wrapped instanceof String) { - return wrapped.equals(that.wrapped); + return wrapped.toString().contentEquals(that.wrapped); Review Comment: see [https://errorprone.info/bugpattern/UndefinedEquals](https://errorprone.info/bugpattern/UndefinedEquals) check For CharSequence -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org