File tree Expand file tree Collapse file tree
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import static org .apache .beam .vendor .guava .v32_1_2_jre .com .google .common .base .Preconditions .checkArgument ;
2121import static org .apache .beam .vendor .guava .v32_1_2_jre .com .google .common .base .Preconditions .checkState ;
2222
23- import java .io .Closeable ;
2423import java .io .IOException ;
2524import java .time .Duration ;
2625import java .time .Instant ;
@@ -441,9 +440,9 @@ public void close() throws IOException {
441440 Set <FileIO > closedIOs = new HashSet <>();
442441 for (DestinationState state : destinations .values ()) {
443442 FileIO io = state .table .io ();
444- if (io instanceof Closeable && closedIOs .add (io )) {
443+ if (io != null && closedIOs .add (io )) {
445444 try {
446- (( Closeable ) io ) .close ();
445+ io .close ();
447446 } catch (IOException e ) {
448447 LOG .warn ("Failed to close FileIO for table '{}'" , state .table .name (), e );
449448 }
You can’t perform that action at this time.
0 commit comments