Commit a110a370 authored by Ard Schrijvers's avatar Ard Schrijvers

CMS7-8367 trivial: imports and alike

parent 43f43a10
......@@ -55,7 +55,7 @@ class AutoReloadScriptLoader {
private String readString(final InputStream in, final String encoding) throws IOException {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final byte[] buffer = new byte[1024];
int length = 0;
int length;
while ((length = != -1) {
out.write(buffer, 0, length);
......@@ -23,14 +23,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
class AutoReloadServiceImpl implements AutoReloadService {
private final AutoReloadServiceConfig config;
private final AutoReloadScriptLoader scriptLoader;
private final AutoReloadServer autoReloadServer;
private final AtomicBoolean enabled;
private final String cachedJavaScript;
AutoReloadServiceImpl(final AutoReloadServiceConfig config, final AutoReloadScriptLoader scriptLoader, final AutoReloadServer autoReloadServer) {
this.config = config;
this.scriptLoader = scriptLoader;
this.autoReloadServer = autoReloadServer;
enabled = new AtomicBoolean(config.isEnabled());
cachedJavaScript = scriptLoader.getJavaScript();
......@@ -17,16 +17,13 @@ package;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import javax.jcr.ValueFormatException;
import javax.jcr.lock.LockException;
import javax.jcr.nodetype.ConstraintViolationException;
import javax.jcr.version.VersionException;
import org.junit.Before;
import org.junit.Test;
import org.onehippo.repository.mock.MockNode;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class AutoReloadServiceConfigTest {
......@@ -27,7 +27,10 @@ import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class AutoReloadServiceImplTest {
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