Skip to content

Commit 5d545c0

Browse files
committed
Remove dead code from UgiBasedMetastoreClientFactory
1 parent 4977b47 commit 5d545c0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/UgiBasedMetastoreClientFactory.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
import io.trino.spi.security.ConnectorIdentity;
1919
import org.apache.thrift.TException;
2020

21-
import java.io.Closeable;
22-
import java.io.IOException;
2321
import java.util.Optional;
2422

2523
import static java.util.Objects.requireNonNull;
@@ -65,12 +63,9 @@ private static void setMetastoreUserOrClose(ThriftMetastoreClient client, String
6563
}
6664
catch (Throwable t) {
6765
// close client and suppress any error from close
68-
try (Closeable ignored = client) {
66+
try (var _ = client) {
6967
throw t;
7068
}
71-
catch (IOException e) {
72-
// impossible; will be suppressed
73-
}
7469
}
7570
}
7671
}

0 commit comments

Comments
 (0)