diff --git a/src/main/java/org/jboss/netty/util/internal/ImmediateExecutor.java b/src/main/java/org/jboss/netty/handler/ssl/ImmediateExecutor.java similarity index 85% rename from src/main/java/org/jboss/netty/util/internal/ImmediateExecutor.java rename to src/main/java/org/jboss/netty/handler/ssl/ImmediateExecutor.java index 308a3bf9ad..89f37c94dd 100644 --- a/src/main/java/org/jboss/netty/util/internal/ImmediateExecutor.java +++ b/src/main/java/org/jboss/netty/handler/ssl/ImmediateExecutor.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.jboss.netty.util.internal; +package org.jboss.netty.handler.ssl; import java.util.concurrent.Executor; @@ -26,12 +26,12 @@ import java.util.concurrent.Executor; * @version $Rev$, $Date$ * */ -public class ImmediateExecutor implements Executor { +final class ImmediateExecutor implements Executor { /** * The default instance. */ - public static final ImmediateExecutor INSTANCE = new ImmediateExecutor(); + static final ImmediateExecutor INSTANCE = new ImmediateExecutor(); public void execute(Runnable command) { command.run(); diff --git a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java index e94511b6cd..c314bbbd13 100644 --- a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java +++ b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java @@ -50,7 +50,6 @@ import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.handler.codec.frame.FrameDecoder; import org.jboss.netty.logging.InternalLogger; import org.jboss.netty.logging.InternalLoggerFactory; -import org.jboss.netty.util.internal.ImmediateExecutor; /** * Adds SSL diff --git a/src/test/java/org/jboss/netty/util/internal/ImmediateExecutorTest.java b/src/test/java/org/jboss/netty/handler/ssl/ImmediateExecutorTest.java similarity index 97% rename from src/test/java/org/jboss/netty/util/internal/ImmediateExecutorTest.java rename to src/test/java/org/jboss/netty/handler/ssl/ImmediateExecutorTest.java index f010fe5b5b..389dfcdcc3 100644 --- a/src/test/java/org/jboss/netty/util/internal/ImmediateExecutorTest.java +++ b/src/test/java/org/jboss/netty/handler/ssl/ImmediateExecutorTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.jboss.netty.util.internal; +package org.jboss.netty.handler.ssl; import static org.junit.Assert.*; diff --git a/src/test/java/org/jboss/netty/util/ThreadRenamingRunnableTest.java b/src/test/java/org/jboss/netty/util/ThreadRenamingRunnableTest.java index c08a1d339a..c0efac3845 100644 --- a/src/test/java/org/jboss/netty/util/ThreadRenamingRunnableTest.java +++ b/src/test/java/org/jboss/netty/util/ThreadRenamingRunnableTest.java @@ -21,7 +21,6 @@ import static org.junit.Assert.*; import java.security.Permission; import java.util.concurrent.Executor; -import org.jboss.netty.util.internal.ImmediateExecutor; import org.junit.Test; @@ -47,7 +46,7 @@ public class ThreadRenamingRunnableTest { @Test public void testWithoutSecurityManager() throws Exception { final String oldThreadName = Thread.currentThread().getName(); - Executor e = ImmediateExecutor.INSTANCE; + Executor e = new ImmediateExecutor(); e.execute(new ThreadRenamingRunnable( new Runnable() { public void run() { @@ -62,7 +61,7 @@ public class ThreadRenamingRunnableTest { @Test public void testWithSecurityManager() throws Exception { final String oldThreadName = Thread.currentThread().getName(); - Executor e = ImmediateExecutor.INSTANCE; + Executor e = new ImmediateExecutor(); System.setSecurityManager(new SecurityManager() { @Override @@ -92,4 +91,16 @@ public class ThreadRenamingRunnableTest { assertEquals(oldThreadName, Thread.currentThread().getName()); } } + + private static class ImmediateExecutor implements Executor { + + ImmediateExecutor() { + super(); + } + + public void execute(Runnable command) { + command.run(); + } + } + }