This commit is contained in:
Phillip Webb
2015-09-05 10:38:30 -07:00
parent 67402405db
commit 6e29ee4557
125 changed files with 638 additions and 506 deletions

View File

@@ -35,7 +35,10 @@ import org.springframework.core.io.ClassPathResource;
* @since 1.3.0
* @see RemoteClientConfiguration
*/
public class RemoteSpringApplication {
public final class RemoteSpringApplication {
private RemoteSpringApplication() {
}
private void run(String[] args) {
Restarter.initialize(args, RestartInitializer.NONE);
@@ -60,6 +63,7 @@ public class RemoteSpringApplication {
Thread.sleep(1000);
}
catch (InterruptedException ex) {
// Ignore
}
}
}

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ import java.nio.charset.Charset;
*
* @author Phillip Webb
*/
class Base64Encoder {
final class Base64Encoder {
private static final Charset UTF_8 = Charset.forName("UTF-8");
@@ -34,6 +34,9 @@ class Base64Encoder {
private static final byte EQUALS_SIGN = '=';
private Base64Encoder() {
}
public static String encode(String string) {
return encode(string.getBytes(UTF_8));
}

View File

@@ -95,6 +95,7 @@ class DelayedLiveReloadTrigger implements Runnable {
this.liveReloadServer.triggerReload();
}
catch (InterruptedException ex) {
// Ignore
}
}

View File

@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
*
* @author Phillip Webb
*/
class ChangeableUrls implements Iterable<URL> {
final class ChangeableUrls implements Iterable<URL> {
private static final String[] SKIPPED_PROJECTS = { "spring-boot",
"spring-boot-devtools", "spring-boot-autoconfigure", "spring-boot-actuator",

View File

@@ -394,6 +394,7 @@ public class Restarter {
}
}
catch (final OutOfMemoryError ex) {
// Expected
}
}

View File

@@ -166,6 +166,7 @@ public class HttpTunnelConnection implements TunnelConnection {
close();
}
catch (IOException ex) {
// Ignore
}
}

View File

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

View File

@@ -428,6 +428,7 @@ public class HttpTunnelServer {
}
}
catch (InterruptedException ex) {
// Ignore
}
}
}

View File

@@ -151,6 +151,25 @@ public class LiveReloadServerTests {
return socket;
}
/**
* Useful main method for manual testing against a real browser.
* @param args main args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
LiveReloadServer server = new LiveReloadServer();
server.start();
while (true) {
try {
Thread.sleep(1000);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
server.triggerReload();
}
}
private static class Driver extends JettyListenerEventDriver {
private int pongCount;
@@ -197,25 +216,6 @@ public class LiveReloadServerTests {
}
/**
* Useful main method for manual testing against a real browser.
* @param args main args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
LiveReloadServer server = new LiveReloadServer();
server.start();
while (true) {
try {
Thread.sleep(1000);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
server.triggerReload();
}
}
/**
* {@link LiveReloadServer} with additional monitoring.
*/

View File

@@ -228,6 +228,7 @@ public class RestarterTests {
Thread.sleep(1200);
}
catch (InterruptedException ex) {
// Ignore
}
}

View File

@@ -124,6 +124,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
Thread.sleep(this.delay);
}
catch (InterruptedException ex) {
// Ignore
}
}
}