Skip to content

Commit b15292c

Browse files
committed
[IcebergIO] Wrap nullable Logger args for Java 17 Checker Framework
Raising the Java floor to 17 routes IcebergIO through a compile path where Beam's org.slf4j.Logger nullness suppression (skipUses) is not applied, so two latent Logger.info(@nullable) calls hard-error under the NullnessChecker. Wrap the nullable args in String.valueOf to make them @nonnull.
1 parent 4f26daf commit b15292c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/AddFiles.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ public PCollectionRowTuple expand(PCollection<String> input) {
185185

186186
if (!Strings.isNullOrEmpty(locationPrefix)) {
187187
LOG.info(
188-
"AddFiles configured to build partition metadata after the prefix: '{}'", locationPrefix);
188+
"AddFiles configured to build partition metadata after the prefix: '{}'",
189+
String.valueOf(locationPrefix));
189190
}
190191

191192
PCollectionTuple dataFiles =

sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/CreateReadTasksDoFn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void process(
6868
if (!DataOperations.APPEND.equals(snapshot.getOperation())) {
6969
LOG.info(
7070
"Skipping non-append snapshot of operation '{}'. Sequence number: {}, id: {}",
71-
snapshot.getOperation(),
71+
String.valueOf(snapshot.getOperation()),
7272
snapshot.getSequenceNumber(),
7373
snapshot.getSnapshotId());
7474
}

0 commit comments

Comments
 (0)