Polish
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ class FileWatchingFailureHandler implements FailureHandler {
|
||||
latch.await();
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
return Outcome.RETRY;
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ public class FileSystemWatcher {
|
||||
scan();
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
remainingScans = FileSystemWatcher.this.remainingScans.get();
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ class DelayedLiveReloadTrigger implements Runnable {
|
||||
this.liveReloadServer.triggerReload();
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -394,6 +394,7 @@ public class Restarter {
|
||||
}
|
||||
}
|
||||
catch (final OutOfMemoryError ex) {
|
||||
// Expected
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ public class HttpTunnelConnection implements TunnelConnection {
|
||||
close();
|
||||
}
|
||||
catch (IOException ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ public class TunnelClient implements SmartInitializingSingleton {
|
||||
this.serverThread.join(2000);
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
this.serverThread = null;
|
||||
}
|
||||
|
||||
@@ -428,6 +428,7 @@ public class HttpTunnelServer {
|
||||
}
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -228,6 +228,7 @@ public class RestarterTests {
|
||||
Thread.sleep(1200);
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
|
||||
Thread.sleep(this.delay);
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user