diff --git a/api/src/main/java/org/apache/iceberg/util/CharSequenceSet.java b/api/src/main/java/org/apache/iceberg/util/CharSequenceSet.java index 5c25fc81919b..1bb5a1dc4e87 100644 --- a/api/src/main/java/org/apache/iceberg/util/CharSequenceSet.java +++ b/api/src/main/java/org/apache/iceberg/util/CharSequenceSet.java @@ -166,6 +166,7 @@ public void clear() { wrapperSet.clear(); } + @SuppressWarnings("CollectionUndefinedEquality") @Override public boolean equals(Object other) { if (this == other) { diff --git a/api/src/main/java/org/apache/iceberg/util/CharSequenceWrapper.java b/api/src/main/java/org/apache/iceberg/util/CharSequenceWrapper.java index e0221206024a..fcccb9eac090 100644 --- a/api/src/main/java/org/apache/iceberg/util/CharSequenceWrapper.java +++ b/api/src/main/java/org/apache/iceberg/util/CharSequenceWrapper.java @@ -44,6 +44,7 @@ public CharSequence get() { } @Override + @SuppressWarnings("UndefinedEquals") public boolean equals(Object other) { if (this == other) { return true; diff --git a/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java b/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java index 6c69a6e01370..e401a8179ea0 100644 --- a/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java +++ b/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java @@ -161,6 +161,7 @@ private DeleteFile[] findEqPartitionDeletes(long seq, DataFile dataFile) { return deletes == null ? EMPTY_DELETES : deletes.filter(seq, dataFile); } + @SuppressWarnings("CollectionUndefinedEquality") private DeleteFile[] findPathDeletes(long seq, DataFile dataFile) { if (posDeletesByPath == null) { return EMPTY_DELETES; diff --git a/core/src/main/java/org/apache/iceberg/avro/AvroWithPartnerByStructureVisitor.java b/core/src/main/java/org/apache/iceberg/avro/AvroWithPartnerByStructureVisitor.java index 28cde9be1719..2c080005d862 100644 --- a/core/src/main/java/org/apache/iceberg/avro/AvroWithPartnerByStructureVisitor.java +++ b/core/src/main/java/org/apache/iceberg/avro/AvroWithPartnerByStructureVisitor.java @@ -109,7 +109,7 @@ private static
T visitUnion(
// types match according to the following pattern:
// Before NULL, branch type i in the union maps to struct field i + 1.
// After NULL, branch type i in the union maps to struct field i.
- int structFieldIndex = (encounteredNull) ? i : i + 1;
+ int structFieldIndex = encounteredNull ? i : i + 1;
if (types.get(i).getType() == Schema.Type.NULL) {
visit(visitor.nullType(), types.get(i), visitor);
encounteredNull = true;
diff --git a/core/src/main/java/org/apache/iceberg/deletes/SortingPositionOnlyDeleteWriter.java b/core/src/main/java/org/apache/iceberg/deletes/SortingPositionOnlyDeleteWriter.java
index 3fc6c5eec9d3..c63f3130109d 100644
--- a/core/src/main/java/org/apache/iceberg/deletes/SortingPositionOnlyDeleteWriter.java
+++ b/core/src/main/java/org/apache/iceberg/deletes/SortingPositionOnlyDeleteWriter.java
@@ -116,6 +116,7 @@ private DeleteWriteResult writeFileDeletes() throws IOException {
return new DeleteWriteResult(deleteFiles, referencedDataFiles);
}
+ @SuppressWarnings("CollectionUndefinedEquality")
private DeleteWriteResult writeDeletes(Collection