Skip to content

Set thread interrupt flag on InterruptedException #1668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ public void run() {
Thread.sleep(startupDelay * 1000);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
// simply proceed
}
if (logger.isInfoEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ private SessionFactory getSessionFactory() {
return this.sessionFactoryFuture.get();
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted during initialization of Hibernate SessionFactory: " +
ex.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ public EntityManagerFactory getNativeEntityManagerFactory() {
return this.nativeEntityManagerFactoryFuture.get();
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted during initialization of native EntityManagerFactory: " +
ex.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public Object getAsyncResult(long timeToWait) {
Thread.sleep(100);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted while waiting for " +
"async result to be set for handler [" + this.handler + "]", ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public ClientHttpResponse execute() throws IOException {
return executeAsync().get();
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IOException(ex.getMessage(), ex);
}
catch (ExecutionException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ protected ResponseEntity<String> executeRequest(
throw new SockJsTransportFailureException("Failed to execute request to " + url, ex);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new SockJsTransportFailureException("Interrupted while processing request to " + url, ex);
}
}
Expand Down