Remove redundant modifiers

This commit is contained in:
Phillip Webb
2015-09-08 15:06:44 -07:00
parent 460ca75fce
commit e07df7e4c6
210 changed files with 325 additions and 325 deletions

View File

@@ -36,7 +36,7 @@ class FileWatchingFailureHandler implements FailureHandler {
private final FileSystemWatcherFactory fileSystemWatcherFactory;
public FileWatchingFailureHandler(FileSystemWatcherFactory fileSystemWatcherFactory) {
FileWatchingFailureHandler(FileSystemWatcherFactory fileSystemWatcherFactory) {
this.fileSystemWatcherFactory = fileSystemWatcherFactory;
}
@@ -62,7 +62,7 @@ class FileWatchingFailureHandler implements FailureHandler {
private final CountDownLatch latch;
public Listener(CountDownLatch latch) {
Listener(CountDownLatch latch) {
this.latch = latch;
}

View File

@@ -47,7 +47,7 @@ class ClassPathFileChangeListener implements FileChangeListener {
* @param fileSystemWatcherToStop the file system watcher to stop on a restart (or
* {@code null})
*/
public ClassPathFileChangeListener(ApplicationEventPublisher eventPublisher,
ClassPathFileChangeListener(ApplicationEventPublisher eventPublisher,
ClassPathRestartStrategy restartStrategy,
FileSystemWatcher fileSystemWatcherToStop) {
Assert.notNull(eventPublisher, "EventPublisher must not be null");

View File

@@ -35,7 +35,7 @@ class FileSnapshot {
private final long lastModified;
public FileSnapshot(File file) {
FileSnapshot(File file) {
Assert.notNull(file, "File must not be null");
Assert.isTrue(file.isFile() || !file.exists(), "File must not be a folder");
this.file = file;

View File

@@ -50,7 +50,7 @@ class FolderSnapshot {
* Create a new {@link FolderSnapshot} for the given folder.
* @param folder the source folder
*/
public FolderSnapshot(File folder) {
FolderSnapshot(File folder) {
Assert.notNull(folder, "Folder must not be null");
Assert.isTrue(folder.isDirectory(), "Folder must not be a file");
this.folder = folder;

View File

@@ -60,7 +60,7 @@ class Connection {
* @param outputStream the socket output stream
* @throws IOException
*/
public Connection(Socket socket, InputStream inputStream, OutputStream outputStream)
Connection(Socket socket, InputStream inputStream, OutputStream outputStream)
throws IOException {
this.socket = socket;
this.inputStream = new ConnectionInputStream(inputStream);

View File

@@ -25,7 +25,7 @@ import java.io.IOException;
*/
class ConnectionClosedException extends IOException {
public ConnectionClosedException() {
ConnectionClosedException() {
super("Connection closed");
}

View File

@@ -31,7 +31,7 @@ class ConnectionInputStream extends FilterInputStream {
private static final int BUFFER_SIZE = 4096;
public ConnectionInputStream(InputStream in) {
ConnectionInputStream(InputStream in) {
super(in);
}

View File

@@ -30,7 +30,7 @@ import org.springframework.util.FileCopyUtils;
*/
class ConnectionOutputStream extends FilterOutputStream {
public ConnectionOutputStream(OutputStream out) {
ConnectionOutputStream(OutputStream out) {
super(out);
}

View File

@@ -39,19 +39,19 @@ class Frame {
* payload.
* @param payload the text payload
*/
public Frame(String payload) {
Frame(String payload) {
Assert.notNull(payload, "Payload must not be null");
this.type = Type.TEXT;
this.payload = payload.getBytes();
}
public Frame(Type type) {
Frame(Type type) {
Assert.notNull(type, "Type must not be null");
this.type = type;
this.payload = NO_BYTES;
}
private Frame(Type type, byte[] payload) {
Frame(Type type, byte[] payload) {
this.type = type;
this.payload = payload;
}
@@ -141,7 +141,7 @@ class Frame {
private final int code;
private Type(int code) {
Type(int code) {
this.code = code;
}

View File

@@ -248,7 +248,7 @@ public class LiveReloadServer {
private final InputStream inputStream;
public ConnectionHandler(Socket socket) throws IOException {
ConnectionHandler(Socket socket) throws IOException {
this.socket = socket;
this.inputStream = socket.getInputStream();
}

View File

@@ -58,7 +58,7 @@ class DelayedLiveReloadTrigger implements Runnable {
private long timeout = TIMEOUT;
public DelayedLiveReloadTrigger(OptionalLiveReloadServer liveReloadServer,
DelayedLiveReloadTrigger(OptionalLiveReloadServer liveReloadServer,
ClientHttpRequestFactory requestFactory, String url) {
Assert.notNull(liveReloadServer, "LiveReloadServer must not be null");
Assert.notNull(requestFactory, "RequestFactory must not be null");

View File

@@ -30,11 +30,11 @@ class MainMethod {
private final Method method;
public MainMethod() {
MainMethod() {
this(Thread.currentThread());
}
public MainMethod(Thread thread) {
MainMethod(Thread thread) {
Assert.notNull(thread, "Thread must not be null");
this.method = getMainMethod(thread);
}

View File

@@ -31,7 +31,7 @@ class RestartLauncher extends Thread {
private Throwable error;
public RestartLauncher(ClassLoader classLoader, String mainClassName, String[] args,
RestartLauncher(ClassLoader classLoader, String mainClassName, String[] args,
UncaughtExceptionHandler exceptionHandler) {
this.mainClassName = mainClassName;
this.args = args;

View File

@@ -558,7 +558,7 @@ public class Restarter {
private Object result;
public LeakSafeThread() {
LeakSafeThread() {
setDaemon(false);
}

View File

@@ -27,7 +27,7 @@ class SilentExitExceptionHandler implements UncaughtExceptionHandler {
private final UncaughtExceptionHandler delegate;
public SilentExitExceptionHandler(UncaughtExceptionHandler delegate) {
SilentExitExceptionHandler(UncaughtExceptionHandler delegate) {
this.delegate = delegate;
}

View File

@@ -32,7 +32,7 @@ class ClassLoaderFileURLStreamHandler extends URLStreamHandler {
private ClassLoaderFile file;
public ClassLoaderFileURLStreamHandler(ClassLoaderFile file) {
ClassLoaderFileURLStreamHandler(ClassLoaderFile file) {
this.file = file;
}
@@ -43,7 +43,7 @@ class ClassLoaderFileURLStreamHandler extends URLStreamHandler {
private class Connection extends URLConnection {
public Connection(URL url) {
Connection(URL url) {
super(url);
}

View File

@@ -206,7 +206,7 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad
private final Enumeration<E> enumeration;
public CompoundEnumeration(E firstElement, Enumeration<E> enumeration) {
CompoundEnumeration(E firstElement, Enumeration<E> enumeration) {
this.firstElement = firstElement;
this.enumeration = enumeration;
}

View File

@@ -192,7 +192,7 @@ public class TunnelClient implements SmartInitializingSingleton {
private boolean closed = false;
public SocketCloseable(SocketChannel socketChannel) {
SocketCloseable(SocketChannel socketChannel) {
this.socketChannel = socketChannel;
}

View File

@@ -70,7 +70,7 @@ public class SocketTargetServerConnection implements TargetServerConnection {
private final ReadableByteChannel readChannel;
public TimeoutAwareChannel(SocketChannel socketChannel) throws IOException {
TimeoutAwareChannel(SocketChannel socketChannel) throws IOException {
this.socketChannel = socketChannel;
this.readChannel = Channels.newChannel(socketChannel.socket()
.getInputStream());

View File

@@ -228,7 +228,7 @@ public class RemoteDevToolsAutoConfigurationTests {
private boolean invoked;
public MockHttpTunnelServer(TargetServerConnection serverConnection) {
MockHttpTunnelServer(TargetServerConnection serverConnection) {
super(serverConnection);
}
@@ -247,7 +247,7 @@ public class RemoteDevToolsAutoConfigurationTests {
private boolean invoked;
public MockHttpRestartServer(SourceFolderUrlFilter sourceFolderUrlFilter) {
MockHttpRestartServer(SourceFolderUrlFilter sourceFolderUrlFilter) {
super(sourceFolderUrlFilter);
}

View File

@@ -141,7 +141,7 @@ public class ClassPathFileSystemWatcherTests {
private final FileSystemWatcher watcher;
public MockFileSystemWatcherFactory(FileSystemWatcher watcher) {
MockFileSystemWatcherFactory(FileSystemWatcher watcher) {
this.watcher = watcher;
}

View File

@@ -174,7 +174,7 @@ public class LiveReloadServerTests {
private int pongCount;
public Driver(WebSocketListener listener) {
Driver(WebSocketListener listener) {
super(WebSocketPolicy.newClientPolicy(), listener);
}
@@ -223,7 +223,7 @@ public class LiveReloadServerTests {
private List<ConnectionClosedException> closedExceptions = new ArrayList<ConnectionClosedException>();
public MonitoredLiveReloadServer(int port) {
MonitoredLiveReloadServer(int port) {
super(port);
}
@@ -239,7 +239,7 @@ public class LiveReloadServerTests {
private class MonitoredConnection extends Connection {
public MonitoredConnection(java.net.Socket socket, InputStream inputStream,
MonitoredConnection(java.net.Socket socket, InputStream inputStream,
OutputStream outputStream) throws IOException {
super(socket, inputStream, outputStream);
}

View File

@@ -90,7 +90,7 @@ public class DefaultRestartInitializerTests {
private static class MockAppClassLoader extends ClassLoader {
public MockAppClassLoader(ClassLoader parent) {
MockAppClassLoader(ClassLoader parent) {
super(parent);
}
@@ -98,7 +98,7 @@ public class DefaultRestartInitializerTests {
private static class MockLauncherClassLoader extends ClassLoader {
public MockLauncherClassLoader(ClassLoader parent) {
MockLauncherClassLoader(ClassLoader parent) {
super(parent);
}
@@ -108,7 +108,7 @@ public class DefaultRestartInitializerTests {
private final boolean considerStackElements;
public MockRestartInitializer(boolean considerStackElements) {
MockRestartInitializer(boolean considerStackElements) {
this.considerStackElements = considerStackElements;
}

View File

@@ -98,7 +98,7 @@ public class MainMethodTests {
private MainMethod mainMethod;
public TestThread(Runnable runnable) {
TestThread(Runnable runnable) {
this.runnable = runnable;
}

View File

@@ -238,7 +238,7 @@ public class RestarterTests {
private ClassLoader relaunchClassLoader;
public TestableRestarter() {
TestableRestarter() {
this(Thread.currentThread(), new String[] {}, false,
new MockRestartInitializer());
}

View File

@@ -61,7 +61,7 @@ public class SilentExitExceptionHandlerTests {
private Throwable thrown;
public TestThread() {
TestThread() {
setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {

View File

@@ -118,7 +118,7 @@ public class RestartServerTests {
private static class MockRestartServer extends RestartServer {
public MockRestartServer(SourceFolderUrlFilter sourceFolderUrlFilter,
MockRestartServer(SourceFolderUrlFilter sourceFolderUrlFilter,
ClassLoader classLoader) {
super(sourceFolderUrlFilter, classLoader);
}

View File

@@ -74,7 +74,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
private class MockRequest extends MockClientHttpRequest {
public MockRequest(URI uri, HttpMethod httpMethod) {
MockRequest(URI uri, HttpMethod httpMethod) {
super(httpMethod, uri);
}
@@ -98,7 +98,7 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
private final HttpStatus status;
public Response(int delay, byte[] payload, HttpStatus status) {
Response(int delay, byte[] payload, HttpStatus status) {
this.delay = delay;
this.payload = payload;
this.status = status;

View File

@@ -162,7 +162,7 @@ public class TunnelClientTests {
private final Closeable closeable;
public TunnelChannel(WritableByteChannel incomingChannel, Closeable closeable) {
TunnelChannel(WritableByteChannel incomingChannel, Closeable closeable) {
this.incomingChannel = incomingChannel;
this.closeable = closeable;
}

View File

@@ -427,12 +427,12 @@ public class HttpTunnelServerTests {
*/
private static class MockHttpConnection extends HttpConnection {
public MockHttpConnection() {
MockHttpConnection() {
super(new ServletServerHttpRequest(new MockHttpServletRequest()),
new ServletServerHttpResponse(new MockHttpServletResponse()));
}
public MockHttpConnection(String content, int seq) {
MockHttpConnection(String content, int seq) {
this();
MockHttpServletRequest request = getServletRequest();
request.setContent(content.getBytes());

View File

@@ -109,7 +109,7 @@ public class SocketTargetServerConnectionTests {
private ServerThread thread;
public MockServer(int port) throws IOException {
MockServer(int port) throws IOException {
this.serverSocket = ServerSocketChannel.open();
this.serverSocket.bind(new InetSocketAddress(port));
}