Skip to content

Commit 5eb9998

Browse files
committed
Simplify Connection.close() logic
1 parent 87ee7bf commit 5eb9998

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/ArrowFlightConnection.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -189,36 +189,11 @@ public void close() throws SQLException {
189189
}
190190
try {
191191
AutoCloseables.close(clientHandler);
192-
} catch (final Exception e) {
193-
if (topLevelException == null) {
194-
topLevelException = e;
195-
} else {
196-
topLevelException.addSuppressed(e);
197-
}
198-
}
199-
try {
200192
if (executorService != null) {
201193
executorService.shutdown();
202194
}
203-
} catch (final Exception e) {
204-
if (topLevelException == null) {
205-
topLevelException = e;
206-
} else {
207-
topLevelException.addSuppressed(e);
208-
}
209-
}
210-
211-
try {
212195
allocator.getChildAllocators().forEach(AutoCloseables::closeNoChecked);
213196
AutoCloseables.close(allocator);
214-
} catch (final Exception e) {
215-
if (topLevelException == null) {
216-
topLevelException = e;
217-
} else {
218-
topLevelException.addSuppressed(e);
219-
}
220-
}
221-
try {
222197
super.close();
223198
} catch (final Exception e) {
224199
if (topLevelException == null) {

0 commit comments

Comments
 (0)