Make classes static wherever possible
This commit is contained in:
parent
c77bac44a2
commit
f77f13faf0
@ -273,7 +273,7 @@ public class SpdySessionHandlerTest {
|
|||||||
|
|
||||||
// Echo Handler opens 4 half-closed streams on session connection
|
// Echo Handler opens 4 half-closed streams on session connection
|
||||||
// and then sets the number of concurrent streams to 3
|
// and then sets the number of concurrent streams to 3
|
||||||
private class EchoHandler extends ChannelInboundMessageHandlerAdapter<Object> {
|
private static class EchoHandler extends ChannelInboundMessageHandlerAdapter<Object> {
|
||||||
private final int closeSignal;
|
private final int closeSignal;
|
||||||
private final boolean server;
|
private final boolean server;
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ public final class MonitorRegistries implements Iterable<MonitorRegistry> {
|
|||||||
return new MonitorRegistryIterator(FACTORIES.iterator());
|
return new MonitorRegistryIterator(FACTORIES.iterator());
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class MonitorRegistryIterator implements Iterator<MonitorRegistry> {
|
private static final class MonitorRegistryIterator implements Iterator<MonitorRegistry> {
|
||||||
|
|
||||||
private final Iterator<MonitorRegistryFactory> factories;
|
private final Iterator<MonitorRegistryFactory> factories;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ public class DatagramMulticastTest extends AbstractDatagramTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class MulticastTestHandler extends ChannelInboundMessageHandlerAdapter<DatagramPacket> {
|
private static final class MulticastTestHandler extends ChannelInboundMessageHandlerAdapter<DatagramPacket> {
|
||||||
private final CountDownLatch latch = new CountDownLatch(1);
|
private final CountDownLatch latch = new CountDownLatch(1);
|
||||||
|
|
||||||
private boolean done;
|
private boolean done;
|
||||||
|
@ -94,7 +94,7 @@ public class ServerSocketSuspendTest extends AbstractServerSocketTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ChannelHandler.Sharable
|
@ChannelHandler.Sharable
|
||||||
private final class AcceptedChannelCounter extends ChannelInboundByteHandlerAdapter {
|
private static final class AcceptedChannelCounter extends ChannelInboundByteHandlerAdapter {
|
||||||
|
|
||||||
final CountDownLatch latch;
|
final CountDownLatch latch;
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ public class SocketSpdyEchoTest extends AbstractSocketTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SpdyEchoTestServerHandler extends ChannelInboundMessageHandlerAdapter<Object> {
|
private static class SpdyEchoTestServerHandler extends ChannelInboundMessageHandlerAdapter<Object> {
|
||||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -245,7 +245,7 @@ public class SocketSpdyEchoTest extends AbstractSocketTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SpdyEchoTestClientHandler extends ChannelInboundByteHandlerAdapter {
|
private static class SpdyEchoTestClientHandler extends ChannelInboundByteHandlerAdapter {
|
||||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||||
final ByteBuf frames;
|
final ByteBuf frames;
|
||||||
volatile int counter;
|
volatile int counter;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.sun.nio.sctp;
|
package com.sun.nio.sctp;
|
||||||
|
|
||||||
|
@SuppressWarnings("all")
|
||||||
public class AbstractNotificationHandler<T> implements NotificationHandler<T> {
|
public class AbstractNotificationHandler<T> implements NotificationHandler<T> {
|
||||||
static {
|
static {
|
||||||
UnsupportedOperatingSystemException.raise();
|
UnsupportedOperatingSystemException.raise();
|
||||||
|
@ -247,7 +247,7 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<?>> {
|
|||||||
return attrs;
|
return attrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class BootstrapChannelFactory implements ChannelFactory {
|
private static final class BootstrapChannelFactory implements ChannelFactory {
|
||||||
private final Class<? extends Channel> clazz;
|
private final Class<? extends Channel> clazz;
|
||||||
|
|
||||||
BootstrapChannelFactory(Class<? extends Channel> clazz) {
|
BootstrapChannelFactory(Class<? extends Channel> clazz) {
|
||||||
|
@ -126,7 +126,7 @@ public class LocalTransportThreadModelTest2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Sharable
|
@Sharable
|
||||||
class LocalHander extends ChannelInboundMessageHandlerAdapter<Object> {
|
static class LocalHander extends ChannelInboundMessageHandlerAdapter<Object> {
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
public volatile ChannelFuture lastWriteFuture;
|
public volatile ChannelFuture lastWriteFuture;
|
||||||
|
Loading…
Reference in New Issue
Block a user