Merge branch '1.3.x

This commit is contained in:
Andy Wilkinson 2016-07-11 17:03:16 +01:00
commit 8e669e2eef
11 changed files with 14 additions and 8 deletions

View File

@ -69,7 +69,7 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>>
Thread.sleep(500L); Thread.sleep(500L);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Swallow exception and continue Thread.currentThread().interrupt();
} }
ShutdownEndpoint.this.context.close(); ShutdownEndpoint.this.context.close();
} }

View File

@ -93,7 +93,7 @@ public class HeapdumpMvcEndpoint extends AbstractMvcEndpoint implements MvcEndpo
} }
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value()); response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());
} }

View File

@ -93,6 +93,7 @@ public class HeapdumpMvcEndpointTests {
public void invokeWhenLockedShouldReturnTooManyRequestsStatus() throws Exception { public void invokeWhenLockedShouldReturnTooManyRequestsStatus() throws Exception {
this.endpoint.setLocked(true); this.endpoint.setLocked(true);
this.mvc.perform(get("/heapdump")).andExpect(status().isTooManyRequests()); this.mvc.perform(get("/heapdump")).andExpect(status().isTooManyRequests());
assertThat(Thread.interrupted()).isTrue();
} }
@Test @Test

View File

@ -91,7 +91,7 @@ public final class RemoteSpringApplication {
Thread.sleep(1000); Thread.sleep(1000);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
} }
} }

View File

@ -52,7 +52,7 @@ class FileWatchingFailureHandler implements FailureHandler {
latch.await(); latch.await();
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
return Outcome.RETRY; return Outcome.RETRY;
} }

View File

@ -239,7 +239,7 @@ public class FileSystemWatcher {
scan(); scan();
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
remainingScans = this.remainingScans.get(); remainingScans = this.remainingScans.get();
} }

View File

@ -96,7 +96,7 @@ class DelayedLiveReloadTrigger implements Runnable {
this.liveReloadServer.triggerReload(); this.liveReloadServer.triggerReload();
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
} }

View File

@ -106,7 +106,7 @@ public class TunnelClient implements SmartInitializingSingleton {
this.serverThread.join(2000); this.serverThread.join(2000);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
this.serverThread = null; this.serverThread = null;
} }

View File

@ -273,6 +273,7 @@ public class HttpTunnelServer {
this.httpConnections.wait(HttpTunnelServer.this.longPollTimeout); this.httpConnections.wait(HttpTunnelServer.this.longPollTimeout);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
Thread.currentThread().interrupt();
closeHttpConnections(); closeHttpConnections();
} }
httpConnection = this.httpConnections.pollFirst(); httpConnection = this.httpConnections.pollFirst();
@ -442,7 +443,7 @@ public class HttpTunnelServer {
} }
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
// Ignore Thread.currentThread().interrupt();
} }
} }
} }

View File

@ -252,6 +252,7 @@ public class RandomAccessDataFile implements RandomAccessData {
: file); : file);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IOException(ex); throw new IOException(ex);
} }
} }
@ -276,6 +277,7 @@ public class RandomAccessDataFile implements RandomAccessData {
} }
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IOException(ex); throw new IOException(ex);
} }
} }

View File

@ -167,6 +167,7 @@ public class StartMojo extends AbstractRunMojo {
this.lock.wait(wait); this.lock.wait(wait);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException( throw new IllegalStateException(
"Interrupted while waiting for Spring Boot app to start."); "Interrupted while waiting for Spring Boot app to start.");
} }
@ -275,6 +276,7 @@ public class StartMojo extends AbstractRunMojo {
this.lock.wait(wait); this.lock.wait(wait);
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new IllegalStateException( throw new IllegalStateException(
"Interrupted while waiting for Spring Boot app to start."); "Interrupted while waiting for Spring Boot app to start.");
} }