gaborkaszab commented on code in PR #17329:
URL: https://github.com/apache/iceberg/pull/17329#discussion_r3636267755
##########
api/src/main/java/org/apache/iceberg/encryption/EncryptingFileIO.java:
##########
@@ -159,14 +159,14 @@ public Map<String, String> properties() {
@Override
public void close() {
- io.close();
-
if (em instanceof Closeable) {
Review Comment:
With this implementation we write io.close() twice. Maybe running it first
as before but in a try-finally block results cleaner code. What I have in mind:
```
try {
io.close();
} finally {
if (em instanceof Closeable closeableManager) {
try {
closeableManager.close();
} catch (IOException e) {
throw new UncheckedIOException("Failed to close encryption
manager", e);
}
}
}
```
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]