Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Futher refactor S3Result#start
Browse files Browse the repository at this point in the history
This moves the exception handling that is duplicated between #next and #getMetadata to #start. The handling of InterruptedException is left because it changes the return value and return logic.
  • Loading branch information
iconara committed Sep 4, 2019
1 parent b0300f5 commit 628a016
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/io/burt/athena/result/S3Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ private void start() throws SQLException, InterruptedException {
SQLException ee = new SQLException(e.getCause());
ee.addSuppressed(e);
throw ee;
} catch (TimeoutException e) {
} catch (TimeoutException | NoSuchKeyException e) {
throw new SQLTimeoutException(e);
} catch (NoSuchKeyException e) {
throw new SQLException(e);
} catch (RuntimeException e) {
if (!(e.getCause() instanceof RuntimeException)) {
SQLException ee = new SQLException(e.getCause());
Expand Down

0 comments on commit 628a016

Please sign in to comment.