Merge pull request #51 from motlin/master
Fixes from static-analysis tools.
This commit is contained in:
commit
0b3a685f95
@ -104,7 +104,7 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
|
||||
return state.get() == ST_CONNECTED;
|
||||
}
|
||||
|
||||
final void setBound() throws ClosedChannelException {
|
||||
void setBound() throws ClosedChannelException {
|
||||
if (!state.compareAndSet(ST_OPEN, ST_BOUND)) {
|
||||
switch (state.get()) {
|
||||
case ST_CLOSED:
|
||||
@ -115,7 +115,7 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
|
||||
}
|
||||
}
|
||||
|
||||
final void setConnected() {
|
||||
void setConnected() {
|
||||
if (state.get() != ST_CLOSED) {
|
||||
state.set(ST_CONNECTED);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ import org.jboss.netty.util.internal.ConversionUtil;
|
||||
*/
|
||||
public class RXTXChannelConfig extends DefaultChannelConfig {
|
||||
|
||||
public static enum Stopbits {
|
||||
public enum Stopbits {
|
||||
|
||||
STOPBITS_1(SerialPort.STOPBITS_1),
|
||||
STOPBITS_2(SerialPort.STOPBITS_2),
|
||||
@ -36,7 +36,7 @@ public class RXTXChannelConfig extends DefaultChannelConfig {
|
||||
|
||||
private final int value;
|
||||
|
||||
private Stopbits(int value) {
|
||||
Stopbits(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public class RXTXChannelConfig extends DefaultChannelConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public static enum Databits {
|
||||
public enum Databits {
|
||||
|
||||
DATABITS_5(SerialPort.DATABITS_5),
|
||||
DATABITS_6(SerialPort.DATABITS_6),
|
||||
@ -63,7 +63,7 @@ public class RXTXChannelConfig extends DefaultChannelConfig {
|
||||
|
||||
private final int value;
|
||||
|
||||
private Databits(int value) {
|
||||
Databits(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ public class RXTXChannelConfig extends DefaultChannelConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public static enum Paritybit {
|
||||
public enum Paritybit {
|
||||
|
||||
NONE(SerialPort.PARITY_NONE),
|
||||
ODD(SerialPort.PARITY_ODD),
|
||||
@ -91,7 +91,7 @@ public class RXTXChannelConfig extends DefaultChannelConfig {
|
||||
|
||||
private final int value;
|
||||
|
||||
private Paritybit(int value) {
|
||||
Paritybit(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ public class HttpTunnelClientChannel extends AbstractChannel implements
|
||||
Channels.fireChannelInterestChanged(this);
|
||||
}
|
||||
|
||||
private class ConsolidatingFutureListener implements ChannelFutureListener {
|
||||
private static class ConsolidatingFutureListener implements ChannelFutureListener {
|
||||
|
||||
private final ChannelFuture completionFuture;
|
||||
|
||||
|
@ -61,7 +61,7 @@ class HttpTunnelServerChannelSink extends AbstractChannelSink {
|
||||
}
|
||||
}
|
||||
|
||||
private final class ChannelFutureProxy implements ChannelFutureListener {
|
||||
private static final class ChannelFutureProxy implements ChannelFutureListener {
|
||||
private final ChannelFuture upstreamFuture;
|
||||
|
||||
ChannelFutureProxy(ChannelFuture upstreamFuture) {
|
||||
|
@ -238,7 +238,7 @@ class ServerMessageSwitch implements ServerMessageSwitchUpstreamInterface,
|
||||
/**
|
||||
* Used to pass the result received from one ChannelFutureListener to another verbatim.
|
||||
*/
|
||||
private final class RelayedChannelFutureListener implements
|
||||
private static final class RelayedChannelFutureListener implements
|
||||
ChannelFutureListener {
|
||||
private final ChannelFuture originalFuture;
|
||||
|
||||
|
@ -30,7 +30,7 @@ final class SocketReceiveBufferPool {
|
||||
@SuppressWarnings("unchecked")
|
||||
private final SoftReference<ByteBuffer>[] pool = new SoftReference[POOL_SIZE];
|
||||
|
||||
final ByteBuffer acquire(int size) {
|
||||
ByteBuffer acquire(int size) {
|
||||
final SoftReference<ByteBuffer>[] pool = this.pool;
|
||||
for (int i = 0; i < POOL_SIZE; i ++) {
|
||||
SoftReference<ByteBuffer> ref = pool[i];
|
||||
@ -59,7 +59,7 @@ final class SocketReceiveBufferPool {
|
||||
return buf;
|
||||
}
|
||||
|
||||
final void release(ByteBuffer buffer) {
|
||||
void release(ByteBuffer buffer) {
|
||||
final SoftReference<ByteBuffer>[] pool = this.pool;
|
||||
for (int i = 0; i < POOL_SIZE; i ++) {
|
||||
SoftReference<ByteBuffer> ref = pool[i];
|
||||
@ -95,4 +95,4 @@ final class SocketReceiveBufferPool {
|
||||
}
|
||||
return q << 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ final class SocketSendBufferPool {
|
||||
super();
|
||||
}
|
||||
|
||||
final SendBuffer acquire(Object message) {
|
||||
SendBuffer acquire(Object message) {
|
||||
if (message instanceof ChannelBuffer) {
|
||||
return acquire((ChannelBuffer) message);
|
||||
} else if (message instanceof FileRegion) {
|
||||
@ -147,7 +147,7 @@ final class SocketSendBufferPool {
|
||||
return q << ALIGN_SHIFT;
|
||||
}
|
||||
|
||||
private final class Preallocation {
|
||||
private static final class Preallocation {
|
||||
final ByteBuffer buffer;
|
||||
int refCnt;
|
||||
|
||||
@ -176,7 +176,7 @@ final class SocketSendBufferPool {
|
||||
void release();
|
||||
}
|
||||
|
||||
class UnpooledSendBuffer implements SendBuffer {
|
||||
static class UnpooledSendBuffer implements SendBuffer {
|
||||
|
||||
final ByteBuffer buffer;
|
||||
final int initialPos;
|
||||
@ -266,7 +266,7 @@ final class SocketSendBufferPool {
|
||||
}
|
||||
}
|
||||
|
||||
final class FileSendBuffer implements SendBuffer {
|
||||
static final class FileSendBuffer implements SendBuffer {
|
||||
|
||||
private final FileRegion file;
|
||||
private long writtenBytes;
|
||||
@ -320,27 +320,27 @@ final class SocketSendBufferPool {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean finished() {
|
||||
public boolean finished() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long writtenBytes() {
|
||||
public long writtenBytes() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long totalBytes() {
|
||||
public long totalBytes() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long transferTo(WritableByteChannel ch) throws IOException {
|
||||
public long transferTo(WritableByteChannel ch) throws IOException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long transferTo(DatagramChannel ch, SocketAddress raddr) throws IOException {
|
||||
public long transferTo(DatagramChannel ch, SocketAddress raddr) throws IOException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ public class WebSocketClientFactory {
|
||||
|
||||
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
|
||||
|
||||
@Override
|
||||
public ChannelPipeline getPipeline() throws Exception {
|
||||
ChannelPipeline pipeline = Channels.pipeline();
|
||||
pipeline.addLast("decoder", new WebSocketHttpResponseDecoder());
|
||||
|
@ -102,14 +102,17 @@ public class WebSocketClientHandler extends SimpleChannelUpstreamHandler impleme
|
||||
e.getChannel().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelFuture connect() {
|
||||
return bootstrap.connect(new InetSocketAddress(url.getHost(), url.getPort()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelFuture disconnect() {
|
||||
return channel.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelFuture send(WebSocketFrame frame) {
|
||||
return channel.write(frame);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ public class IOStream {
|
||||
|
||||
// Configure the event pipeline factory.
|
||||
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
|
||||
@Override
|
||||
public ChannelPipeline getPipeline() throws Exception {
|
||||
DefaultChannelPipeline pipeline = new DefaultChannelPipeline();
|
||||
pipeline.addLast("framer", new DelimiterBasedFrameDecoder(8192, Delimiters.lineDelimiter()));
|
||||
|
@ -25,6 +25,7 @@ public final class LocalTimeProtocol {
|
||||
;
|
||||
|
||||
|
||||
@Override
|
||||
public final int getNumber() { return value; }
|
||||
|
||||
public static Continent valueOf(int value) {
|
||||
@ -51,20 +52,23 @@ public final class LocalTimeProtocol {
|
||||
private static final com.google.protobuf.Internal.EnumLiteMap<Continent>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<Continent>() {
|
||||
@Override
|
||||
public Continent findValueByNumber(int number) {
|
||||
return Continent.valueOf(number)
|
||||
; }
|
||||
};
|
||||
|
||||
@Override
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
@Override
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
public static com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor().getEnumTypes().get(0);
|
||||
}
|
||||
@ -82,7 +86,7 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
private final int index;
|
||||
private final int value;
|
||||
private Continent(int index, int value) {
|
||||
Continent(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
@ -106,6 +110,7 @@ public final class LocalTimeProtocol {
|
||||
;
|
||||
|
||||
|
||||
@Override
|
||||
public final int getNumber() { return value; }
|
||||
|
||||
public static DayOfWeek valueOf(int value) {
|
||||
@ -128,20 +133,23 @@ public final class LocalTimeProtocol {
|
||||
private static final com.google.protobuf.Internal.EnumLiteMap<DayOfWeek>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<DayOfWeek>() {
|
||||
@Override
|
||||
public DayOfWeek findValueByNumber(int number) {
|
||||
return DayOfWeek.valueOf(number)
|
||||
; }
|
||||
};
|
||||
|
||||
@Override
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
@Override
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
public static com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor().getEnumTypes().get(1);
|
||||
}
|
||||
@ -159,7 +167,7 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
private final int index;
|
||||
private final int value;
|
||||
private DayOfWeek(int index, int value) {
|
||||
DayOfWeek(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
@ -184,15 +192,17 @@ public final class LocalTimeProtocol {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
public static com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_Location_descriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_Location_fieldAccessorTable;
|
||||
@ -215,7 +225,8 @@ public final class LocalTimeProtocol {
|
||||
private void initFields() {
|
||||
continent_ = org.jboss.netty.example.localtime.LocalTimeProtocol.Continent.AFRICA;
|
||||
}
|
||||
public final boolean isInitialized() {
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
if (!hasContinent) {
|
||||
return false;
|
||||
}
|
||||
@ -225,6 +236,7 @@ public final class LocalTimeProtocol {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
@ -238,6 +250,7 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
@Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) {
|
||||
@ -326,10 +339,12 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
@Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(org.jboss.netty.example.localtime.LocalTimeProtocol.Location prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@Override
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
public static final class Builder extends
|
||||
@ -345,10 +360,12 @@ public final class LocalTimeProtocol {
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected org.jboss.netty.example.localtime.LocalTimeProtocol.Location internalGetResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clear() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -358,22 +375,27 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.Location.getDescriptor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.Location getDefaultInstanceForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.Location.getDefaultInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return result.isInitialized();
|
||||
}
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.Location build() {
|
||||
if (result != null && !isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
@ -390,6 +412,7 @@ public final class LocalTimeProtocol {
|
||||
return buildPartial();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.Location buildPartial() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -400,6 +423,7 @@ public final class LocalTimeProtocol {
|
||||
return returnMe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.jboss.netty.example.localtime.LocalTimeProtocol.Location) {
|
||||
return mergeFrom((org.jboss.netty.example.localtime.LocalTimeProtocol.Location)other);
|
||||
@ -423,6 +447,7 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
@ -530,15 +555,17 @@ public final class LocalTimeProtocol {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Locations getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
public static com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_Locations_descriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_Locations_fieldAccessorTable;
|
||||
@ -558,7 +585,8 @@ public final class LocalTimeProtocol {
|
||||
|
||||
private void initFields() {
|
||||
}
|
||||
public final boolean isInitialized() {
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
for (org.jboss.netty.example.localtime.LocalTimeProtocol.Location element : getLocationList()) {
|
||||
if (!element.isInitialized()) {
|
||||
return false;
|
||||
@ -567,6 +595,7 @@ public final class LocalTimeProtocol {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
@ -577,6 +606,7 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
@Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) {
|
||||
@ -661,10 +691,12 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
@Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(org.jboss.netty.example.localtime.LocalTimeProtocol.Locations prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@Override
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
public static final class Builder extends
|
||||
@ -680,10 +712,12 @@ public final class LocalTimeProtocol {
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected org.jboss.netty.example.localtime.LocalTimeProtocol.Locations internalGetResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clear() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -693,22 +727,27 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.Locations.getDescriptor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.Locations getDefaultInstanceForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.Locations.getDefaultInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return result.isInitialized();
|
||||
}
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.Locations build() {
|
||||
if (result != null && !isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
@ -725,6 +764,7 @@ public final class LocalTimeProtocol {
|
||||
return buildPartial();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.Locations buildPartial() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -739,6 +779,7 @@ public final class LocalTimeProtocol {
|
||||
return returnMe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.jboss.netty.example.localtime.LocalTimeProtocol.Locations) {
|
||||
return mergeFrom((org.jboss.netty.example.localtime.LocalTimeProtocol.Locations)other);
|
||||
@ -762,6 +803,7 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
@ -870,15 +912,17 @@ public final class LocalTimeProtocol {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalTime getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
public static com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_LocalTime_descriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_LocalTime_fieldAccessorTable;
|
||||
@ -936,7 +980,8 @@ public final class LocalTimeProtocol {
|
||||
private void initFields() {
|
||||
dayOfWeek_ = org.jboss.netty.example.localtime.LocalTimeProtocol.DayOfWeek.SUNDAY;
|
||||
}
|
||||
public final boolean isInitialized() {
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
if (!hasYear) {
|
||||
return false;
|
||||
}
|
||||
@ -961,6 +1006,7 @@ public final class LocalTimeProtocol {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
@ -989,6 +1035,7 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
@Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) {
|
||||
@ -1097,10 +1144,12 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
@Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@Override
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
public static final class Builder extends
|
||||
@ -1116,10 +1165,12 @@ public final class LocalTimeProtocol {
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime internalGetResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clear() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -1129,22 +1180,27 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime.getDescriptor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime getDefaultInstanceForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime.getDefaultInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return result.isInitialized();
|
||||
}
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime build() {
|
||||
if (result != null && !isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
@ -1161,6 +1217,7 @@ public final class LocalTimeProtocol {
|
||||
return buildPartial();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime buildPartial() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -1171,6 +1228,7 @@ public final class LocalTimeProtocol {
|
||||
return returnMe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime) {
|
||||
return mergeFrom((org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime)other);
|
||||
@ -1209,6 +1267,7 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
@ -1423,15 +1482,17 @@ public final class LocalTimeProtocol {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalTimes getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
public static com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_LocalTimes_descriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.internal_static_org_jboss_netty_example_localtime_LocalTimes_fieldAccessorTable;
|
||||
@ -1451,7 +1512,8 @@ public final class LocalTimeProtocol {
|
||||
|
||||
private void initFields() {
|
||||
}
|
||||
public final boolean isInitialized() {
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
for (org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime element : getLocalTimeList()) {
|
||||
if (!element.isInitialized()) {
|
||||
return false;
|
||||
@ -1460,6 +1522,7 @@ public final class LocalTimeProtocol {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
@ -1470,6 +1533,7 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
@Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) {
|
||||
@ -1554,10 +1618,12 @@ public final class LocalTimeProtocol {
|
||||
}
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
@Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@Override
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
public static final class Builder extends
|
||||
@ -1573,10 +1639,12 @@ public final class LocalTimeProtocol {
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes internalGetResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clear() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -1586,22 +1654,27 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes.getDescriptor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes getDefaultInstanceForType() {
|
||||
return org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes.getDefaultInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return result.isInitialized();
|
||||
}
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes build() {
|
||||
if (result != null && !isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
@ -1618,6 +1691,7 @@ public final class LocalTimeProtocol {
|
||||
return buildPartial();
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes buildPartial() {
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
@ -1632,6 +1706,7 @@ public final class LocalTimeProtocol {
|
||||
return returnMe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes) {
|
||||
return mergeFrom((org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes)other);
|
||||
@ -1655,6 +1730,7 @@ public final class LocalTimeProtocol {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
@ -1801,6 +1877,7 @@ public final class LocalTimeProtocol {
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
@Override
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
|
@ -203,7 +203,7 @@ public enum Base64Dialect {
|
||||
final byte[] decodabet;
|
||||
final boolean breakLinesByDefault;
|
||||
|
||||
private Base64Dialect(byte[] alphabet, byte[] decodabet, boolean breakLinesByDefault) {
|
||||
Base64Dialect(byte[] alphabet, byte[] decodabet, boolean breakLinesByDefault) {
|
||||
this.alphabet = alphabet;
|
||||
this.decodabet = decodabet;
|
||||
this.breakLinesByDefault = breakLinesByDefault;
|
||||
|
@ -67,7 +67,7 @@ final class HttpHeaderDateFormat extends SimpleDateFormat {
|
||||
* First obsolete format<p>
|
||||
* Sunday, 06-Nov-94 08:49:37 GMT -> E, d-MMM-y HH:mm:ss z
|
||||
*/
|
||||
private final class HttpHeaderDateFormatObsolete1 extends SimpleDateFormat {
|
||||
private static final class HttpHeaderDateFormatObsolete1 extends SimpleDateFormat {
|
||||
private static final long serialVersionUID = -3178072504225114298L;
|
||||
|
||||
HttpHeaderDateFormatObsolete1() {
|
||||
@ -81,7 +81,7 @@ final class HttpHeaderDateFormat extends SimpleDateFormat {
|
||||
* <p>
|
||||
* Sun Nov 6 08:49:37 1994 -> EEE, MMM d HH:mm:ss yyyy
|
||||
*/
|
||||
private final class HttpHeaderDateFormatObsolete2 extends SimpleDateFormat {
|
||||
private static final class HttpHeaderDateFormatObsolete2 extends SimpleDateFormat {
|
||||
private static final long serialVersionUID = 3010674519968303714L;
|
||||
|
||||
HttpHeaderDateFormatObsolete2() {
|
||||
|
@ -124,7 +124,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
*
|
||||
* @apiviz.exclude
|
||||
*/
|
||||
protected static enum State {
|
||||
protected enum State {
|
||||
SKIP_CONTROL_CHARS,
|
||||
READ_INITIAL,
|
||||
READ_HEADER,
|
||||
|
@ -88,7 +88,7 @@ public class HttpPostBodyUtil {
|
||||
Not allowed: "quoted-printable"
|
||||
/ "base64"
|
||||
*/
|
||||
public static enum TransferEncodingMechanism {
|
||||
public enum TransferEncodingMechanism {
|
||||
/**
|
||||
* Default encoding
|
||||
*/
|
||||
@ -104,11 +104,11 @@ public class HttpPostBodyUtil {
|
||||
|
||||
public String value;
|
||||
|
||||
private TransferEncodingMechanism(String value) {
|
||||
TransferEncodingMechanism(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private TransferEncodingMechanism() {
|
||||
TransferEncodingMechanism() {
|
||||
value = name();
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ public class HttpPostRequestDecoder {
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
private static enum MultiPartStatus {
|
||||
private enum MultiPartStatus {
|
||||
NOTSTARTED,
|
||||
PREAMBLE,
|
||||
HEADERDELIMITER,
|
||||
@ -1485,7 +1485,7 @@ public class HttpPostRequestDecoder {
|
||||
* @author frederic bregier
|
||||
*
|
||||
*/
|
||||
public class IncompatibleDataDecoderException extends Exception {
|
||||
public static class IncompatibleDataDecoderException extends Exception {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -67,6 +67,7 @@ public class UTF8Output {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (state != UTF8_ACCEPT) {
|
||||
throw new UTF8Exception("bytes are not UTF-8");
|
||||
|
@ -83,7 +83,7 @@ public class WebSocket08FrameDecoder extends ReplayingDecoder<WebSocket08FrameDe
|
||||
private boolean maskedPayload = false;
|
||||
private boolean receivedClosingHandshake = false;
|
||||
|
||||
public static enum State {
|
||||
public enum State {
|
||||
FRAME_START, MASKING_KEY, PAYLOAD, CORRUPT
|
||||
}
|
||||
|
||||
@ -369,4 +369,4 @@ public class WebSocket08FrameDecoder extends ReplayingDecoder<WebSocket08FrameDe
|
||||
protocolViolation(channel, "invalid UTF-8 bytes");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class WebSocketClientHandshaker10 extends WebSocketClientHandshaker {
|
||||
|
||||
private String expectedChallengeResponseString = null;
|
||||
|
||||
private final String protocol = null;
|
||||
private static final String protocol = null;
|
||||
|
||||
private boolean allowExtensions = false;
|
||||
|
||||
|
@ -138,7 +138,7 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
|
||||
* @param hash the hash code for the key
|
||||
* @return the segment
|
||||
*/
|
||||
final Segment<K, V> segmentFor(int hash) {
|
||||
Segment<K, V> segmentFor(int hash) {
|
||||
return segments[hash >>> segmentShift & segmentMask];
|
||||
}
|
||||
|
||||
@ -173,21 +173,21 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final K key() {
|
||||
K key() {
|
||||
return (K) key;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final V value() {
|
||||
V value() {
|
||||
return (V) value;
|
||||
}
|
||||
|
||||
final void setValue(V value) {
|
||||
void setValue(V value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
static <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
return new HashEntry[i];
|
||||
}
|
||||
}
|
||||
@ -273,7 +273,7 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> Segment<K, V>[] newArray(int i) {
|
||||
static <K, V> Segment<K, V>[] newArray(int i) {
|
||||
return new Segment[i];
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
|
||||
* @param hash the hash code for the key
|
||||
* @return the segment
|
||||
*/
|
||||
final Segment<K, V> segmentFor(int hash) {
|
||||
Segment<K, V> segmentFor(int hash) {
|
||||
return segments[hash >>> segmentShift & segmentMask];
|
||||
}
|
||||
|
||||
@ -173,21 +173,21 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final K key() {
|
||||
K key() {
|
||||
return (K) key;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final V value() {
|
||||
V value() {
|
||||
return (V) value;
|
||||
}
|
||||
|
||||
final void setValue(V value) {
|
||||
void setValue(V value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
static <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
return new HashEntry[i];
|
||||
}
|
||||
}
|
||||
@ -273,7 +273,7 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> Segment<K, V>[] newArray(int i) {
|
||||
static <K, V> Segment<K, V>[] newArray(int i) {
|
||||
return new Segment[i];
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
||||
* @param hash the hash code for the key
|
||||
* @return the segment
|
||||
*/
|
||||
final Segment<K, V> segmentFor(int hash) {
|
||||
Segment<K, V> segmentFor(int hash) {
|
||||
return segments[hash >>> segmentShift & segmentMask];
|
||||
}
|
||||
|
||||
@ -167,11 +167,11 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public final int keyHash() {
|
||||
public int keyHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public final Object keyRef() {
|
||||
public Object keyRef() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -204,16 +204,16 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final K key() {
|
||||
K key() {
|
||||
return ((WeakReference<K>) keyRef).get();
|
||||
}
|
||||
|
||||
final V value() {
|
||||
V value() {
|
||||
return dereferenceValue(valueRef);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final V dereferenceValue(Object value) {
|
||||
V dereferenceValue(Object value) {
|
||||
if (value instanceof WeakKeyReference) {
|
||||
return ((Reference<V>) value).get();
|
||||
}
|
||||
@ -221,12 +221,12 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
||||
return (V) value;
|
||||
}
|
||||
|
||||
final void setValue(V value) {
|
||||
void setValue(V value) {
|
||||
this.valueRef = value;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
static <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
return new HashEntry[i];
|
||||
}
|
||||
}
|
||||
@ -318,7 +318,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> Segment<K, V>[] newArray(int i) {
|
||||
static <K, V> Segment<K, V>[] newArray(int i) {
|
||||
return new Segment[i];
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
final void removeStale() {
|
||||
void removeStale() {
|
||||
WeakKeyReference ref;
|
||||
while ((ref = (WeakKeyReference) refQueue.poll()) != null) {
|
||||
remove(ref.keyRef(), ref.keyHash(), null, true);
|
||||
|
@ -145,7 +145,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
* @param hash the hash code for the key
|
||||
* @return the segment
|
||||
*/
|
||||
final Segment<K, V> segmentFor(int hash) {
|
||||
Segment<K, V> segmentFor(int hash) {
|
||||
return segments[hash >>> segmentShift & segmentMask];
|
||||
}
|
||||
|
||||
@ -167,11 +167,11 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public final int keyHash() {
|
||||
public int keyHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public final Object keyRef() {
|
||||
public Object keyRef() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -204,16 +204,16 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final K key() {
|
||||
K key() {
|
||||
return ((WeakReference<K>) keyRef).get();
|
||||
}
|
||||
|
||||
final V value() {
|
||||
V value() {
|
||||
return dereferenceValue(valueRef);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final V dereferenceValue(Object value) {
|
||||
V dereferenceValue(Object value) {
|
||||
if (value instanceof WeakKeyReference) {
|
||||
return ((Reference<V>) value).get();
|
||||
}
|
||||
@ -221,12 +221,12 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
return (V) value;
|
||||
}
|
||||
|
||||
final void setValue(V value) {
|
||||
void setValue(V value) {
|
||||
this.valueRef = value;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
static <K, V> HashEntry<K, V>[] newArray(int i) {
|
||||
return new HashEntry[i];
|
||||
}
|
||||
}
|
||||
@ -318,7 +318,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final <K, V> Segment<K, V>[] newArray(int i) {
|
||||
static <K, V> Segment<K, V>[] newArray(int i) {
|
||||
return new Segment[i];
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
final void removeStale() {
|
||||
void removeStale() {
|
||||
WeakKeyReference ref;
|
||||
while ((ref = (WeakKeyReference) refQueue.poll()) != null) {
|
||||
remove(ref.keyRef(), ref.keyHash(), null, true);
|
||||
|
@ -437,7 +437,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
volatile Thread waiter; // null until waiting
|
||||
|
||||
// CAS methods for fields
|
||||
final boolean casNext(Node cmp, Node val) {
|
||||
boolean casNext(Node cmp, Node val) {
|
||||
if (AtomicFieldUpdaterUtil.isAvailable()) {
|
||||
return nextUpdater.compareAndSet(this, cmp, val);
|
||||
} else {
|
||||
@ -452,7 +452,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
}
|
||||
}
|
||||
|
||||
final boolean casItem(Object cmp, Object val) {
|
||||
boolean casItem(Object cmp, Object val) {
|
||||
// assert cmp == null || cmp.getClass() != Node.class;
|
||||
if (AtomicFieldUpdaterUtil.isAvailable()) {
|
||||
return itemUpdater.compareAndSet(this, cmp, val);
|
||||
@ -481,7 +481,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
* Links node to itself to avoid garbage retention. Called
|
||||
* only after CASing head field, so uses relaxed write.
|
||||
*/
|
||||
final void forgetNext() {
|
||||
void forgetNext() {
|
||||
this.next = this;
|
||||
}
|
||||
|
||||
@ -494,7 +494,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
* follows either CAS or return from park (if ever parked;
|
||||
* else we don't care).
|
||||
*/
|
||||
final void forgetContents() {
|
||||
void forgetContents() {
|
||||
this.item = this;
|
||||
this.waiter = null;
|
||||
}
|
||||
@ -503,7 +503,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
* Returns true if this node has been matched, including the
|
||||
* case of artificial matches due to cancellation.
|
||||
*/
|
||||
final boolean isMatched() {
|
||||
boolean isMatched() {
|
||||
Object x = item;
|
||||
return x == this || x == null == isData;
|
||||
}
|
||||
@ -511,7 +511,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
/**
|
||||
* Returns true if this is an unmatched request node.
|
||||
*/
|
||||
final boolean isUnmatchedRequest() {
|
||||
boolean isUnmatchedRequest() {
|
||||
return !isData && item == null;
|
||||
}
|
||||
|
||||
@ -520,7 +520,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
* appended to this node because this node is unmatched and
|
||||
* has opposite data mode.
|
||||
*/
|
||||
final boolean cannotPrecede(boolean haveData) {
|
||||
boolean cannotPrecede(boolean haveData) {
|
||||
boolean d = isData;
|
||||
Object x;
|
||||
return d != haveData && (x = item) != this && x != null == d;
|
||||
@ -529,7 +529,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
/**
|
||||
* Tries to artificially match a data node -- used by remove.
|
||||
*/
|
||||
final boolean tryMatchData() {
|
||||
boolean tryMatchData() {
|
||||
// assert isData;
|
||||
Object x = item;
|
||||
if (x != null && x != this && casItem(x, null)) {
|
||||
@ -895,12 +895,12 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean hasNext() {
|
||||
public boolean hasNext() {
|
||||
return nextNode != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final E next() {
|
||||
public E next() {
|
||||
Node p = nextNode;
|
||||
if (p == null) {
|
||||
throw new NoSuchElementException();
|
||||
@ -911,7 +911,7 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void remove() {
|
||||
public void remove() {
|
||||
Node p = lastRet;
|
||||
if (p == null) {
|
||||
throw new IllegalStateException();
|
||||
|
@ -68,7 +68,7 @@ public final class NonReentrantLock extends AbstractQueuedSynchronizer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final boolean tryAcquire(int acquires) {
|
||||
protected boolean tryAcquire(int acquires) {
|
||||
if (compareAndSetState(0, 1)) {
|
||||
owner = Thread.currentThread();
|
||||
return true;
|
||||
@ -77,7 +77,7 @@ public final class NonReentrantLock extends AbstractQueuedSynchronizer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final boolean tryRelease(int releases) {
|
||||
protected boolean tryRelease(int releases) {
|
||||
if (Thread.currentThread() != owner) {
|
||||
throw new IllegalMonitorStateException();
|
||||
}
|
||||
@ -87,7 +87,7 @@ public final class NonReentrantLock extends AbstractQueuedSynchronizer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final boolean isHeldExclusively() {
|
||||
protected boolean isHeldExclusively() {
|
||||
return getState() != 0 && owner == Thread.currentThread();
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public final class JZlib {
|
||||
// Bit length codes must not exceed MAX_BL_BITS bits
|
||||
static final int MAX_BL_BITS = 7;
|
||||
|
||||
static enum WrapperType {
|
||||
enum WrapperType {
|
||||
NONE, ZLIB, GZIP, ZLIB_OR_NONE;
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ public abstract class AbstractSocketEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -149,7 +149,7 @@ public abstract class AbstractSocketFixedLengthEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -157,7 +157,7 @@ public abstract class AbstractSocketCompatibleObjectStreamEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -156,7 +156,7 @@ public abstract class AbstractSocketObjectStreamEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -162,7 +162,7 @@ public abstract class AbstractSocketStringEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
@ -194,7 +194,7 @@ public abstract class AbstractSocketSslEchoTest {
|
||||
}
|
||||
}
|
||||
|
||||
private class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class EchoHandler extends SimpleChannelUpstreamHandler {
|
||||
volatile Channel channel;
|
||||
final AtomicReference<Throwable> exception = new AtomicReference<Throwable>();
|
||||
volatile int counter;
|
||||
|
Loading…
Reference in New Issue
Block a user