Fixing ErrorProne Warnings Across Apache Iceberg
PR: apache/iceberg#13217
Background Apache Iceberg uses ErrorProne, Google’s static analysis tool for Java, to catch bugs at compile time. Five warnings existed across the API, Flink, GCP, and Azure modules, each representing a different category of issue.
Fixes 1. UnnecessaryParentheses (ADLSFileIO) Removal of unnecessary parentheses to align with the project’s style conventions.
2. ObjectsHashCodePrimitive (DynamicRecordInternalSerializer) // before: boxes the boolean into an Object Objects.hashCode(booleanValue) // after: operates directly on the primitive Boolean.hashCode(booleanValue) Objects.hashCode() wraps primitives in their boxed type before computing the hash. Boolean.hashCode() avoids this unnecessary allocation.