Remove unnecessary qualifiers
This commit is contained in:
parent
8e0437e3e6
commit
a76cdc26d0
@ -57,7 +57,7 @@ import org.jboss.netty.handler.ssl.SslHandler;
|
||||
/**
|
||||
*/
|
||||
class HttpTunnelingClientSocketChannel extends AbstractChannel
|
||||
implements org.jboss.netty.channel.socket.SocketChannel {
|
||||
implements SocketChannel {
|
||||
|
||||
final HttpTunnelingSocketChannelConfig config;
|
||||
|
||||
@ -67,7 +67,7 @@ class HttpTunnelingClientSocketChannel extends AbstractChannel
|
||||
|
||||
final SocketChannel realChannel;
|
||||
|
||||
private final HttpTunnelingClientSocketChannel.ServletChannelHandler handler = new ServletChannelHandler();
|
||||
private final ServletChannelHandler handler = new ServletChannelHandler();
|
||||
|
||||
HttpTunnelingClientSocketChannel(
|
||||
ChannelFactory factory,
|
||||
|
@ -191,7 +191,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
||||
// when the selector is closed before this is run
|
||||
//
|
||||
// See https://github.com/netty/netty/issues/685
|
||||
Selector selector = NioClientSocketPipelineSink.Boss.this.selector;
|
||||
Selector selector = Boss.this.selector;
|
||||
|
||||
if (selector != null) {
|
||||
if (wakenUp.compareAndSet(false, true)) {
|
||||
|
@ -15,7 +15,20 @@
|
||||
*/
|
||||
package org.jboss.netty.channel.socket.nio;
|
||||
|
||||
import static org.jboss.netty.channel.Channels.*;
|
||||
import org.jboss.netty.channel.Channel;
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelException;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.ChannelPipeline;
|
||||
import org.jboss.netty.channel.ChannelState;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
import org.jboss.netty.channel.MessageEvent;
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
import org.jboss.netty.util.ExternalResourceReleasable;
|
||||
import org.jboss.netty.util.ThreadRenamingRunnable;
|
||||
import org.jboss.netty.util.internal.DeadLockProofWorker;
|
||||
import org.jboss.netty.util.internal.ExecutorUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketAddress;
|
||||
@ -35,20 +48,7 @@ import java.util.concurrent.RejectedExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.jboss.netty.channel.Channel;
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelException;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.ChannelPipeline;
|
||||
import org.jboss.netty.channel.ChannelState;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
import org.jboss.netty.channel.MessageEvent;
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
import org.jboss.netty.util.ExternalResourceReleasable;
|
||||
import org.jboss.netty.util.ThreadRenamingRunnable;
|
||||
import org.jboss.netty.util.internal.DeadLockProofWorker;
|
||||
import org.jboss.netty.util.internal.ExecutorUtil;
|
||||
import static org.jboss.netty.channel.Channels.*;
|
||||
|
||||
class NioServerSocketPipelineSink extends AbstractNioChannelSink implements ExternalResourceReleasable {
|
||||
|
||||
@ -65,9 +65,9 @@ class NioServerSocketPipelineSink extends AbstractNioChannelSink implements Exte
|
||||
|
||||
NioServerSocketPipelineSink(Executor bossExecutor, int bossCount, WorkerPool<NioWorker> workerPool) {
|
||||
this.workerPool = workerPool;
|
||||
this.bosses = new Boss[bossCount];
|
||||
bosses = new Boss[bossCount];
|
||||
for (int i = 0; i < bossCount; i++) {
|
||||
this.bosses[i] = new Boss(bossExecutor);
|
||||
bosses[i] = new Boss(bossExecutor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@ class NioServerSocketPipelineSink extends AbstractNioChannelSink implements Exte
|
||||
logger.warn(
|
||||
"Failed to close a selector.", e);
|
||||
} finally {
|
||||
this.selector = null;
|
||||
selector = null;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
|
@ -17,6 +17,8 @@ package org.jboss.netty.channel.socket.nio;
|
||||
|
||||
import org.jboss.netty.channel.socket.InternetProtocolFamily;
|
||||
|
||||
import java.net.ProtocolFamily;
|
||||
import java.net.StandardProtocolFamily;
|
||||
|
||||
|
||||
/**
|
||||
@ -33,13 +35,13 @@ final class ProtocolFamilyConverter {
|
||||
/**
|
||||
* Convert the {@link InternetProtocolFamily}. This MUST only be called on jdk version >= 7.
|
||||
*/
|
||||
public static java.net.ProtocolFamily convert(InternetProtocolFamily family) {
|
||||
public static ProtocolFamily convert(InternetProtocolFamily family) {
|
||||
switch (family) {
|
||||
case IPv4:
|
||||
return java.net.StandardProtocolFamily.INET;
|
||||
return StandardProtocolFamily.INET;
|
||||
|
||||
case IPv6:
|
||||
return java.net.StandardProtocolFamily.INET6;
|
||||
return StandardProtocolFamily.INET6;
|
||||
default:
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.handler.codec.http.websocketx;
|
||||
import org.jboss.netty.channel.Channel;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.ChannelFutureListener;
|
||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||
import org.jboss.netty.channel.Channels;
|
||||
import org.jboss.netty.handler.codec.http.HttpRequest;
|
||||
import org.jboss.netty.util.internal.StringUtil;
|
||||
@ -43,7 +44,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
|
||||
/**
|
||||
* {@link ChannelFutureListener} which will call
|
||||
* {@link Channels#fireExceptionCaught(org.jboss.netty.channel.ChannelHandlerContext, Throwable)}
|
||||
* {@link Channels#fireExceptionCaught(ChannelHandlerContext, Throwable)}
|
||||
* if the {@link ChannelFuture} was not successful.
|
||||
*/
|
||||
public static final ChannelFutureListener HANDSHAKE_LISTENER = new ChannelFutureListener() {
|
||||
|
@ -36,7 +36,7 @@ import com.google.protobuf.CodedInputStream;
|
||||
* +--------+---------------+ +---------------+
|
||||
* </pre>
|
||||
*
|
||||
* @see com.google.protobuf.CodedInputStream
|
||||
* @see CodedInputStream
|
||||
*/
|
||||
public class ProtobufVarint32FrameDecoder extends FrameDecoder {
|
||||
|
||||
|
@ -38,7 +38,7 @@ import com.google.protobuf.CodedOutputStream;
|
||||
* +---------------+ +--------+---------------+
|
||||
* </pre> *
|
||||
*
|
||||
* @see com.google.protobuf.CodedOutputStream
|
||||
* @see CodedOutputStream
|
||||
*/
|
||||
@Sharable
|
||||
public class ProtobufVarint32LengthFieldPrepender extends OneToOneEncoder {
|
||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.handler.stream;
|
||||
import static org.jboss.netty.channel.Channels.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.OutOfMemoryError;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
@ -42,7 +43,7 @@ import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
/**
|
||||
* A {@link ChannelHandler} that adds support for writing a large data stream
|
||||
* asynchronously neither spending a lot of memory nor getting
|
||||
* {@link java.lang.OutOfMemoryError}. Large data streaming such as file
|
||||
* {@link OutOfMemoryError}. Large data streaming such as file
|
||||
* transfer requires complicated state management in a {@link ChannelHandler}
|
||||
* implementation. {@link ChunkedWriteHandler} manages such complicated states
|
||||
* so that you can send a large data stream without difficulties.
|
||||
|
@ -16,6 +16,8 @@
|
||||
package org.jboss.netty.logging;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Logger factory which creates an
|
||||
@ -26,8 +28,8 @@ public class CommonsLoggerFactory extends InternalLoggerFactory {
|
||||
|
||||
@Override
|
||||
public InternalLogger newInstance(String name) {
|
||||
final org.apache.commons.logging.Log logger =
|
||||
org.apache.commons.logging.LogFactory.getLog(name);
|
||||
final Log logger =
|
||||
LogFactory.getLog(name);
|
||||
return new CommonsLogger(logger, name);
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.jboss.netty.logging;
|
||||
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
/**
|
||||
* Logger factory which creates a
|
||||
@ -26,8 +27,8 @@ public class JBossLoggerFactory extends InternalLoggerFactory {
|
||||
|
||||
@Override
|
||||
public InternalLogger newInstance(String name) {
|
||||
final org.jboss.logging.Logger logger =
|
||||
org.jboss.logging.Logger.getLogger(name);
|
||||
final Logger logger =
|
||||
Logger.getLogger(name);
|
||||
return new JBossLogger(logger);
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@
|
||||
package org.jboss.netty.logging;
|
||||
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Logger factory which creates a
|
||||
* <a href="http://java.sun.com/javase/6/docs/technotes/guides/logging/index.html">java.util.logging</a>
|
||||
@ -25,8 +27,8 @@ public class JdkLoggerFactory extends InternalLoggerFactory {
|
||||
|
||||
@Override
|
||||
public InternalLogger newInstance(String name) {
|
||||
final java.util.logging.Logger logger =
|
||||
java.util.logging.Logger.getLogger(name);
|
||||
final Logger logger =
|
||||
Logger.getLogger(name);
|
||||
return new JdkLogger(logger, name);
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
package org.jboss.netty.logging;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Logger factory which creates an
|
||||
* <a href="http://logging.apache.org/log4j/1.2/index.html">Apache Log4J</a>
|
||||
@ -24,8 +26,8 @@ public class Log4JLoggerFactory extends InternalLoggerFactory {
|
||||
|
||||
@Override
|
||||
public InternalLogger newInstance(String name) {
|
||||
final org.apache.log4j.Logger logger =
|
||||
org.apache.log4j.Logger.getLogger(name);
|
||||
final Logger logger =
|
||||
Logger.getLogger(name);
|
||||
return new Log4JLogger(logger);
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@
|
||||
package org.jboss.netty.logging;
|
||||
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Logger factory which creates a <a href="http://www.slf4j.org/">SLF4J</a>
|
||||
@ -25,8 +27,8 @@ public class Slf4JLoggerFactory extends InternalLoggerFactory {
|
||||
|
||||
@Override
|
||||
public InternalLogger newInstance(String name) {
|
||||
final org.slf4j.Logger logger =
|
||||
org.slf4j.LoggerFactory.getLogger(name);
|
||||
final Logger logger =
|
||||
LoggerFactory.getLogger(name);
|
||||
return new Slf4JLogger(logger);
|
||||
}
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ public class HashedWheelTimer implements Timer {
|
||||
// it to a temporary list - we will reschedule it in a
|
||||
// separate loop.
|
||||
if (slipped == null) {
|
||||
slipped = new ArrayList<HashedWheelTimer.HashedWheelTimeout>();
|
||||
slipped = new ArrayList<HashedWheelTimeout>();
|
||||
}
|
||||
slipped.add(timeout);
|
||||
}
|
||||
|
@ -31,13 +31,14 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
|
||||
/**
|
||||
* An alternative identity-comparing {@link ConcurrentMap} which is similar to
|
||||
* {@link java.util.concurrent.ConcurrentHashMap}.
|
||||
* {@link ConcurrentHashMap}.
|
||||
* @param <K> the type of keys maintained by this map
|
||||
* @param <V> the type of mapped values
|
||||
*/
|
||||
|
@ -34,13 +34,14 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
|
||||
/**
|
||||
* An alternative weak-key identity-comparing {@link ConcurrentMap} which is
|
||||
* similar to {@link java.util.concurrent.ConcurrentHashMap}.
|
||||
* similar to {@link ConcurrentHashMap}.
|
||||
* @param <K> the type of keys maintained by this map
|
||||
* @param <V> the type of mapped values
|
||||
*/
|
||||
|
@ -34,13 +34,14 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
|
||||
/**
|
||||
* An alternative weak-key {@link ConcurrentMap} which is similar to
|
||||
* {@link java.util.concurrent.ConcurrentHashMap}.
|
||||
* {@link ConcurrentHashMap}.
|
||||
* @param <K> the type of keys maintained by this map
|
||||
* @param <V> the type of mapped values
|
||||
*/
|
||||
|
@ -22,12 +22,13 @@
|
||||
|
||||
package org.jboss.netty.util.internal;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* A random number generator isolated to the current thread. Like the
|
||||
* global {@link java.util.Random} generator used by the {@link
|
||||
* java.lang.Math} class, a {@code ThreadLocalRandom} is initialized
|
||||
* global {@link Random} generator used by the {@link
|
||||
* Math} class, a {@code ThreadLocalRandom} is initialized
|
||||
* with an internally generated seed that may not otherwise be
|
||||
* modified. When applicable, use of {@code ThreadLocalRandom} rather
|
||||
* than shared {@code Random} objects in concurrent programs will
|
||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.logging;
|
||||
import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.junit.Test;
|
||||
|
||||
public class CommonsLoggerTest {
|
||||
@ -25,8 +26,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsDebugEnabled() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
expect(mock.isDebugEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -38,8 +39,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsInfoEnabled() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
expect(mock.isInfoEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -51,8 +52,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsWarnEnabled() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
expect(mock.isWarnEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -64,8 +65,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsErrorEnabled() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
expect(mock.isErrorEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -77,8 +78,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebug() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.debug("a");
|
||||
replay(mock);
|
||||
@ -90,8 +91,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebugWithException() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.debug("a", e);
|
||||
replay(mock);
|
||||
@ -103,8 +104,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfo() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.info("a");
|
||||
replay(mock);
|
||||
@ -116,8 +117,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfoWithException() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.info("a", e);
|
||||
replay(mock);
|
||||
@ -129,8 +130,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarn() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.warn("a");
|
||||
replay(mock);
|
||||
@ -142,8 +143,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarnWithException() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.warn("a", e);
|
||||
replay(mock);
|
||||
@ -155,8 +156,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testError() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.error("a");
|
||||
replay(mock);
|
||||
@ -168,8 +169,8 @@ public class CommonsLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testErrorWithException() {
|
||||
org.apache.commons.logging.Log mock =
|
||||
createStrictMock(org.apache.commons.logging.Log.class);
|
||||
Log mock =
|
||||
createStrictMock(Log.class);
|
||||
|
||||
mock.error("a", e);
|
||||
replay(mock);
|
||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.logging;
|
||||
import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
import org.junit.Test;
|
||||
|
||||
public class JBossLoggerTest {
|
||||
@ -26,8 +27,8 @@ public class JBossLoggerTest {
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void testIsDebugEnabled() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isDebugEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -40,8 +41,8 @@ public class JBossLoggerTest {
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void testIsInfoEnabled() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isInfoEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -53,8 +54,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsWarnEnabled() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
replay(mock);
|
||||
|
||||
InternalLogger logger = new JBossLogger(mock);
|
||||
@ -64,8 +65,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsErrorEnabled() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
replay(mock);
|
||||
|
||||
InternalLogger logger = new JBossLogger(mock);
|
||||
@ -75,8 +76,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebug() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.debug("a");
|
||||
replay(mock);
|
||||
@ -88,8 +89,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebugWithException() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.debug("a", e);
|
||||
replay(mock);
|
||||
@ -101,8 +102,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfo() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.info("a");
|
||||
replay(mock);
|
||||
@ -114,8 +115,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfoWithException() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.info("a", e);
|
||||
replay(mock);
|
||||
@ -127,8 +128,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarn() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.warn("a");
|
||||
replay(mock);
|
||||
@ -140,8 +141,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarnWithException() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.warn("a", e);
|
||||
replay(mock);
|
||||
@ -153,8 +154,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testError() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.error("a");
|
||||
replay(mock);
|
||||
@ -166,8 +167,8 @@ public class JBossLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testErrorWithException() {
|
||||
org.jboss.logging.Logger mock =
|
||||
createStrictMock(org.jboss.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.error("a", e);
|
||||
replay(mock);
|
||||
|
@ -19,6 +19,7 @@ import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@ -28,8 +29,8 @@ public class JdkLoggerTest {
|
||||
@Test
|
||||
public void testIsDebugEnabled() {
|
||||
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isLoggable(Level.FINE)).andReturn(true);
|
||||
replay(mock);
|
||||
@ -41,8 +42,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsInfoEnabled() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isLoggable(Level.INFO)).andReturn(true);
|
||||
replay(mock);
|
||||
@ -54,8 +55,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsWarnEnabled() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isLoggable(Level.WARNING)).andReturn(true);
|
||||
replay(mock);
|
||||
@ -67,8 +68,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsErrorEnabled() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isLoggable(Level.SEVERE)).andReturn(true);
|
||||
replay(mock);
|
||||
@ -80,8 +81,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebug() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.FINE, "foo", null, "a");
|
||||
replay(mock);
|
||||
@ -93,8 +94,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebugWithException() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.FINE, "foo", null, "a", e);
|
||||
replay(mock);
|
||||
@ -106,8 +107,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfo() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.INFO, "foo", null, "a");
|
||||
replay(mock);
|
||||
@ -119,8 +120,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfoWithException() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.INFO, "foo", null, "a", e);
|
||||
replay(mock);
|
||||
@ -132,8 +133,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarn() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.WARNING, "foo", null, "a");
|
||||
replay(mock);
|
||||
@ -145,8 +146,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarnWithException() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.WARNING, "foo", null, "a", e);
|
||||
replay(mock);
|
||||
@ -158,8 +159,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testError() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.SEVERE, "foo", null, "a");
|
||||
replay(mock);
|
||||
@ -171,8 +172,8 @@ public class JdkLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testErrorWithException() {
|
||||
java.util.logging.Logger mock =
|
||||
createStrictMock(java.util.logging.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.logp(Level.SEVERE, "foo", null, "a", e);
|
||||
replay(mock);
|
||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.logging;
|
||||
import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Test;
|
||||
|
||||
public class Log4JLoggerTest {
|
||||
@ -26,8 +27,8 @@ public class Log4JLoggerTest {
|
||||
@Test
|
||||
public void testIsDebugEnabled() {
|
||||
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isDebugEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -39,8 +40,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsInfoEnabled() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isInfoEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -52,8 +53,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsWarnEnabled() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
replay(mock);
|
||||
|
||||
@ -64,8 +65,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsErrorEnabled() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
replay(mock);
|
||||
|
||||
InternalLogger logger = new Log4JLogger(mock);
|
||||
@ -75,8 +76,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebug() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.debug("a");
|
||||
replay(mock);
|
||||
@ -88,8 +89,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebugWithException() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.debug("a", e);
|
||||
replay(mock);
|
||||
@ -101,8 +102,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfo() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.info("a");
|
||||
replay(mock);
|
||||
@ -114,8 +115,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfoWithException() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.info("a", e);
|
||||
replay(mock);
|
||||
@ -127,8 +128,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarn() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.warn("a");
|
||||
replay(mock);
|
||||
@ -140,8 +141,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarnWithException() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.warn("a", e);
|
||||
replay(mock);
|
||||
@ -153,8 +154,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testError() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.error("a");
|
||||
replay(mock);
|
||||
@ -166,8 +167,8 @@ public class Log4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testErrorWithException() {
|
||||
org.apache.log4j.Logger mock =
|
||||
createStrictMock(org.apache.log4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.error("a", e);
|
||||
replay(mock);
|
||||
|
@ -19,14 +19,15 @@ import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class Slf4JLoggerTest {
|
||||
private static final Exception e = new Exception();
|
||||
|
||||
@Test
|
||||
public void testIsDebugEnabled() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isDebugEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -38,8 +39,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsInfoEnabled() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isInfoEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -51,8 +52,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsWarnEnabled() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isWarnEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -64,8 +65,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testIsErrorEnabled() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
expect(mock.isErrorEnabled()).andReturn(true);
|
||||
replay(mock);
|
||||
@ -77,8 +78,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebug() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.debug("a");
|
||||
replay(mock);
|
||||
@ -90,8 +91,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testDebugWithException() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.debug("a", e);
|
||||
replay(mock);
|
||||
@ -103,8 +104,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfo() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.info("a");
|
||||
replay(mock);
|
||||
@ -116,8 +117,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testInfoWithException() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.info("a", e);
|
||||
replay(mock);
|
||||
@ -129,8 +130,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarn() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.warn("a");
|
||||
replay(mock);
|
||||
@ -142,8 +143,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testWarnWithException() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.warn("a", e);
|
||||
replay(mock);
|
||||
@ -155,8 +156,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testError() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.error("a");
|
||||
replay(mock);
|
||||
@ -168,8 +169,8 @@ public class Slf4JLoggerTest {
|
||||
|
||||
@Test
|
||||
public void testErrorWithException() {
|
||||
org.slf4j.Logger mock =
|
||||
createStrictMock(org.slf4j.Logger.class);
|
||||
Logger mock =
|
||||
createStrictMock(Logger.class);
|
||||
|
||||
mock.error("a", e);
|
||||
replay(mock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user