Commit 4963cfd6 authored by Andy Wilkinson's avatar Andy Wilkinson

Reset thread's interrupted flag when catching InterruptedException

Closes gh-6360
parent e53d3167
......@@ -66,7 +66,7 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>>
Thread.sleep(500L);
}
catch (InterruptedException ex) {
// Swallow exception and continue
Thread.currentThread().interrupt();
}
ShutdownEndpoint.this.context.close();
}
......
......@@ -91,7 +91,7 @@ public final class RemoteSpringApplication {
Thread.sleep(1000);
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
}
}
......
......@@ -52,7 +52,7 @@ class FileWatchingFailureHandler implements FailureHandler {
latch.await();
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
return Outcome.RETRY;
}
......
......@@ -239,7 +239,7 @@ public class FileSystemWatcher {
scan();
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
remainingScans = this.remainingScans.get();
}
......
......@@ -96,7 +96,7 @@ class DelayedLiveReloadTrigger implements Runnable {
this.liveReloadServer.triggerReload();
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
}
......
......@@ -98,7 +98,7 @@ public class TunnelClient implements SmartInitializingSingleton {
this.serverThread.join(2000);
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
this.serverThread = null;
}
......
......@@ -273,6 +273,7 @@ public class HttpTunnelServer {
this.httpConnections.wait(HttpTunnelServer.this.longPollTimeout);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
closeHttpConnections();
}
httpConnection = this.httpConnections.pollFirst();
......@@ -442,7 +443,7 @@ public class HttpTunnelServer {
}
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
}
}
......
......@@ -252,6 +252,7 @@ public class RandomAccessDataFile implements RandomAccessData {
: file);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IOException(ex);
}
}
......@@ -276,6 +277,7 @@ public class RandomAccessDataFile implements RandomAccessData {
}
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IOException(ex);
}
}
......
......@@ -167,6 +167,7 @@ public class StartMojo extends AbstractRunMojo {
this.lock.wait(wait);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException(
"Interrupted while waiting for Spring Boot app to start.");
}
......@@ -275,6 +276,7 @@ public class StartMojo extends AbstractRunMojo {
this.lock.wait(wait);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException(
"Interrupted while waiting for Spring Boot app to start.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment