nastra commented on code in PR #10023: URL: https://github.com/apache/iceberg/pull/10023#discussion_r1535670174
########## api/src/main/java/org/apache/iceberg/types/JavaHashes.java: ########## @@ -26,6 +26,10 @@ public class JavaHashes { private JavaHashes() {} public static int hashCode(CharSequence str) { + if (null == str) { Review Comment: there are places in the codebase that use `CharSequenceWrapper.wrap(...)` and then set the wrapper to `null`. The issue was never uncovered because equals/hashCode was never called on those `CharSequenceWrapper` instances. When adding `TestCharSequenceWrapper` I noticed that this failed with a NPE, so I fixed this here and also added some tests around this -- 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