Update to new checkstyle plugin (#8777)

Motivation:

We need to update to a new checkstyle plugin to allow the usage of lambdas.

Modifications:

- Update to new plugin version.
- Fix checkstyle problems.

Result:

Be able to use checkstyle plugin which supports new Java syntax.
This commit is contained in:
Norman Maurer 2019-01-24 16:24:19 +01:00 committed by GitHub
parent 9e7385ddba
commit 310f31b392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 196 additions and 104 deletions

View File

@ -461,7 +461,7 @@ public class PooledByteBufAllocatorTest extends AbstractByteBufAllocatorTest<Poo
private final ByteBufAllocator allocator; private final ByteBufAllocator allocator;
private final AtomicReference<Object> finish = new AtomicReference<>(); private final AtomicReference<Object> finish = new AtomicReference<>();
public AllocationThread(ByteBufAllocator allocator) { AllocationThread(ByteBufAllocator allocator) {
this.allocator = allocator; this.allocator = allocator;
} }

View File

@ -79,7 +79,7 @@ public class CombinedHttpHeaders extends DefaultHttpHeaders {
return charSequenceEscaper; return charSequenceEscaper;
} }
public CombinedHttpHeadersImpl(HashingStrategy<CharSequence> nameHashingStrategy, CombinedHttpHeadersImpl(HashingStrategy<CharSequence> nameHashingStrategy,
ValueConverter<CharSequence> valueConverter, ValueConverter<CharSequence> valueConverter,
io.netty.handler.codec.DefaultHeaders.NameValidator<CharSequence> nameValidator) { io.netty.handler.codec.DefaultHeaders.NameValidator<CharSequence> nameValidator) {
super(nameHashingStrategy, valueConverter, nameValidator); super(nameHashingStrategy, valueConverter, nameValidator);

View File

@ -81,16 +81,16 @@ public final class HttpServerCodec extends CombinedChannelDuplexHandler<HttpRequ
} }
private final class HttpServerRequestDecoder extends HttpRequestDecoder { private final class HttpServerRequestDecoder extends HttpRequestDecoder {
public HttpServerRequestDecoder(int maxInitialLineLength, int maxHeaderSize) { HttpServerRequestDecoder(int maxInitialLineLength, int maxHeaderSize) {
super(maxInitialLineLength, maxHeaderSize); super(maxInitialLineLength, maxHeaderSize);
} }
public HttpServerRequestDecoder(int maxInitialLineLength, int maxHeaderSize, HttpServerRequestDecoder(int maxInitialLineLength, int maxHeaderSize,
boolean validateHeaders) { boolean validateHeaders) {
super(maxInitialLineLength, maxHeaderSize, validateHeaders); super(maxInitialLineLength, maxHeaderSize, validateHeaders);
} }
public HttpServerRequestDecoder(int maxInitialLineLength, int maxHeaderSize, HttpServerRequestDecoder(int maxInitialLineLength, int maxHeaderSize,
boolean validateHeaders, int initialBufferSize) { boolean validateHeaders, int initialBufferSize) {
super(maxInitialLineLength, maxHeaderSize, validateHeaders, initialBufferSize); super(maxInitialLineLength, maxHeaderSize, validateHeaders, initialBufferSize);
} }

View File

@ -59,7 +59,9 @@ public abstract class AbstractHttpData extends AbstractReferenceCounted implemen
} }
@Override @Override
public long getMaxSize() { return maxSize; } public long getMaxSize() {
return maxSize;
}
@Override @Override
public void setMaxSize(long maxSize) { public void setMaxSize(long maxSize) {

View File

@ -45,7 +45,9 @@ public class WebSocketClientProtocolHandler extends WebSocketProtocolHandler {
/** /**
* Returns the used handshaker * Returns the used handshaker
*/ */
public WebSocketClientHandshaker handshaker() { return handshaker; } public WebSocketClientHandshaker handshaker() {
return handshaker;
}
/** /**
* Events that are fired to notify about handshake status * Events that are fired to notify about handshake status

View File

@ -47,7 +47,7 @@ abstract class DeflateDecoder extends WebSocketExtensionDecoder {
* Constructor * Constructor
* @param noContext true to disable context takeover. * @param noContext true to disable context takeover.
*/ */
public DeflateDecoder(boolean noContext) { DeflateDecoder(boolean noContext) {
this.noContext = noContext; this.noContext = noContext;
} }

View File

@ -49,7 +49,7 @@ abstract class DeflateEncoder extends WebSocketExtensionEncoder {
* @param windowSize maximum size of the window compressor buffer. * @param windowSize maximum size of the window compressor buffer.
* @param noContext true to disable context takeover. * @param noContext true to disable context takeover.
*/ */
public DeflateEncoder(int compressionLevel, int windowSize, boolean noContext) { DeflateEncoder(int compressionLevel, int windowSize, boolean noContext) {
this.compressionLevel = compressionLevel; this.compressionLevel = compressionLevel;
this.windowSize = windowSize; this.windowSize = windowSize;
this.noContext = noContext; this.noContext = noContext;

View File

@ -81,7 +81,7 @@ public final class DeflateFrameClientExtensionHandshaker implements WebSocketCli
private final int compressionLevel; private final int compressionLevel;
public DeflateFrameClientExtension(int compressionLevel) { DeflateFrameClientExtension(int compressionLevel) {
this.compressionLevel = compressionLevel; this.compressionLevel = compressionLevel;
} }

View File

@ -74,7 +74,7 @@ public final class DeflateFrameServerExtensionHandshaker implements WebSocketSer
private final String extensionName; private final String extensionName;
private final int compressionLevel; private final int compressionLevel;
public DeflateFrameServerExtension(int compressionLevel, String extensionName) { DeflateFrameServerExtension(int compressionLevel, String extensionName) {
this.extensionName = extensionName; this.extensionName = extensionName;
this.compressionLevel = compressionLevel; this.compressionLevel = compressionLevel;
} }

View File

@ -30,7 +30,7 @@ class PerFrameDeflateDecoder extends DeflateDecoder {
* Constructor * Constructor
* @param noContext true to disable context takeover. * @param noContext true to disable context takeover.
*/ */
public PerFrameDeflateDecoder(boolean noContext) { PerFrameDeflateDecoder(boolean noContext) {
super(noContext); super(noContext);
} }

View File

@ -32,7 +32,7 @@ class PerFrameDeflateEncoder extends DeflateEncoder {
* @param windowSize maximum size of the window compressor buffer. * @param windowSize maximum size of the window compressor buffer.
* @param noContext true to disable context takeover. * @param noContext true to disable context takeover.
*/ */
public PerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext) { PerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext) {
super(compressionLevel, windowSize, noContext); super(compressionLevel, windowSize, noContext);
} }

View File

@ -176,7 +176,7 @@ public final class PerMessageDeflateClientExtensionHandshaker implements WebSock
return RSV1; return RSV1;
} }
public PermessageDeflateExtension(boolean serverNoContext, int serverWindowSize, PermessageDeflateExtension(boolean serverNoContext, int serverWindowSize,
boolean clientNoContext, int clientWindowSize) { boolean clientNoContext, int clientWindowSize) {
this.serverNoContext = serverNoContext; this.serverNoContext = serverNoContext;
this.serverWindowSize = serverWindowSize; this.serverWindowSize = serverWindowSize;

View File

@ -35,7 +35,7 @@ class PerMessageDeflateDecoder extends DeflateDecoder {
* Constructor * Constructor
* @param noContext true to disable context takeover. * @param noContext true to disable context takeover.
*/ */
public PerMessageDeflateDecoder(boolean noContext) { PerMessageDeflateDecoder(boolean noContext) {
super(noContext); super(noContext);
} }

View File

@ -37,7 +37,7 @@ class PerMessageDeflateEncoder extends DeflateEncoder {
* @param windowSize maximum size of the window compressor buffer. * @param windowSize maximum size of the window compressor buffer.
* @param noContext true to disable context takeover. * @param noContext true to disable context takeover.
*/ */
public PerMessageDeflateEncoder(int compressionLevel, int windowSize, boolean noContext) { PerMessageDeflateEncoder(int compressionLevel, int windowSize, boolean noContext) {
super(compressionLevel, windowSize, noContext); super(compressionLevel, windowSize, noContext);
} }

View File

@ -151,7 +151,7 @@ public final class PerMessageDeflateServerExtensionHandshaker implements WebSock
private final boolean clientNoContext; private final boolean clientNoContext;
private final int clientWindowSize; private final int clientWindowSize;
public PermessageDeflateExtension(int compressionLevel, boolean serverNoContext, PermessageDeflateExtension(int compressionLevel, boolean serverNoContext,
int serverWindowSize, boolean clientNoContext, int clientWindowSize) { int serverWindowSize, boolean clientNoContext, int clientWindowSize) {
this.compressionLevel = compressionLevel; this.compressionLevel = compressionLevel;
this.serverNoContext = serverNoContext; this.serverNoContext = serverNoContext;

View File

@ -69,7 +69,7 @@ public final class WebSocketExtensionTestUtil {
private final String name; private final String name;
public WebSocketExtensionDataMatcher(String name) { WebSocketExtensionDataMatcher(String name) {
this.name = name; this.name = name;
} }

View File

@ -930,7 +930,7 @@ public class DefaultHttp2Connection implements Http2Connection {
private final Set<Http2Stream> streams = new LinkedHashSet<>(); private final Set<Http2Stream> streams = new LinkedHashSet<>();
private int pendingIterations; private int pendingIterations;
public ActiveStreams(List<Listener> listeners) { ActiveStreams(List<Listener> listeners) {
this.listeners = listeners; this.listeners = listeners;
} }

View File

@ -296,7 +296,7 @@ public class DefaultHttp2LocalFlowController implements Http2LocalFlowController
* received. * received.
*/ */
private final class AutoRefillState extends DefaultState { private final class AutoRefillState extends DefaultState {
public AutoRefillState(Http2Stream stream, int initialWindowSize) { AutoRefillState(Http2Stream stream, int initialWindowSize) {
super(stream, initialWindowSize); super(stream, initialWindowSize);
} }
@ -349,7 +349,7 @@ public class DefaultHttp2LocalFlowController implements Http2LocalFlowController
private int lowerBound; private int lowerBound;
private boolean endOfStream; private boolean endOfStream;
public DefaultState(Http2Stream stream, int initialWindowSize) { DefaultState(Http2Stream stream, int initialWindowSize) {
this.stream = stream; this.stream = stream;
window(initialWindowSize); window(initialWindowSize);
streamWindowUpdateRatio = windowUpdateRatio; streamWindowUpdateRatio = windowUpdateRatio;
@ -613,7 +613,7 @@ public class DefaultHttp2LocalFlowController implements Http2LocalFlowController
private CompositeStreamException compositeException; private CompositeStreamException compositeException;
private final int delta; private final int delta;
public WindowUpdateVisitor(int delta) { WindowUpdateVisitor(int delta) {
this.delta = delta; this.delta = delta;
} }

View File

@ -528,7 +528,7 @@ final class HpackDecoder {
private HeaderType previousType; private HeaderType previousType;
private Http2Exception validationException; private Http2Exception validationException;
public Http2HeadersSink(int streamId, Http2Headers headers, long maxHeaderListSize, boolean validate) { Http2HeadersSink(int streamId, Http2Headers headers, long maxHeaderListSize, boolean validate) {
this.headers = headers; this.headers = headers;
this.maxHeaderListSize = maxHeaderListSize; this.maxHeaderListSize = maxHeaderListSize;
this.streamId = streamId; this.streamId = streamId;

View File

@ -75,14 +75,14 @@ final class HpackEncoder {
/** /**
* Creates a new encoder. * Creates a new encoder.
*/ */
public HpackEncoder(boolean ignoreMaxHeaderListSize) { HpackEncoder(boolean ignoreMaxHeaderListSize) {
this(ignoreMaxHeaderListSize, 16); this(ignoreMaxHeaderListSize, 16);
} }
/** /**
* Creates a new encoder. * Creates a new encoder.
*/ */
public HpackEncoder(boolean ignoreMaxHeaderListSize, int arraySizeHint) { HpackEncoder(boolean ignoreMaxHeaderListSize, int arraySizeHint) {
this.ignoreMaxHeaderListSize = ignoreMaxHeaderListSize; this.ignoreMaxHeaderListSize = ignoreMaxHeaderListSize;
maxHeaderTableSize = DEFAULT_HEADER_TABLE_SIZE; maxHeaderTableSize = DEFAULT_HEADER_TABLE_SIZE;
maxHeaderListSize = MAX_HEADER_LIST_SIZE; maxHeaderListSize = MAX_HEADER_LIST_SIZE;

View File

@ -233,7 +233,7 @@ public class Http2ConnectionHandler extends ByteToMessageDecoder implements Http
private ByteBuf clientPrefaceString; private ByteBuf clientPrefaceString;
private boolean prefaceSent; private boolean prefaceSent;
public PrefaceDecoder(ChannelHandlerContext ctx) throws Exception { PrefaceDecoder(ChannelHandlerContext ctx) throws Exception {
clientPrefaceString = clientPrefaceString(encoder.connection()); clientPrefaceString = clientPrefaceString(encoder.connection());
// This handler was just added to the context. In case it was handled after // This handler was just added to the context. In case it was handled after
// the connection became active, send the connection preface now. // the connection became active, send the connection preface now.

View File

@ -626,7 +626,7 @@ public class DefaultHttp2ConnectionTest {
private final boolean[] array; private final boolean[] array;
private final int index; private final int index;
public ListenerExceptionThrower(boolean[] array, int index) { ListenerExceptionThrower(boolean[] array, int index) {
this.array = array; this.array = array;
this.index = index; this.index = index;
} }
@ -642,7 +642,7 @@ public class DefaultHttp2ConnectionTest {
private final boolean[] array; private final boolean[] array;
private final int index; private final int index;
public ListenerVerifyCallAnswer(boolean[] array, int index) { ListenerVerifyCallAnswer(boolean[] array, int index) {
this.array = array; this.array = array;
this.index = index; this.index = index;
} }

View File

@ -57,16 +57,30 @@ public class XmlAttribute {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlAttribute that = (XmlAttribute) o; XmlAttribute that = (XmlAttribute) o;
if (!name.equals(that.name)) { return false; } if (!name.equals(that.name)) {
if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) { return false; } return false;
if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) { return false; } }
if (type != null ? !type.equals(that.type) : that.type != null) { return false; } if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) {
if (value != null ? !value.equals(that.value) : that.value != null) { return false; } return false;
}
if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) {
return false;
}
if (type != null ? !type.equals(that.type) : that.type != null) {
return false;
}
if (value != null ? !value.equals(that.value) : that.value != null) {
return false;
}
return true; return true;
} }

View File

@ -32,12 +32,18 @@ public abstract class XmlContent {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlContent that = (XmlContent) o; XmlContent that = (XmlContent) o;
if (data != null ? !data.equals(that.data) : that.data != null) { return false; } if (data != null ? !data.equals(that.data) : that.data != null) {
return false;
}
return true; return true;
} }

View File

@ -32,12 +32,18 @@ public class XmlDTD {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlDTD xmlDTD = (XmlDTD) o; XmlDTD xmlDTD = (XmlDTD) o;
if (text != null ? !text.equals(xmlDTD.text) : xmlDTD.text != null) { return false; } if (text != null ? !text.equals(xmlDTD.text) : xmlDTD.text != null) {
return false;
}
return true; return true;
} }

View File

@ -54,17 +54,27 @@ public class XmlDocumentStart {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlDocumentStart that = (XmlDocumentStart) o; XmlDocumentStart that = (XmlDocumentStart) o;
if (standalone != that.standalone) { return false; } if (standalone != that.standalone) {
if (encoding != null ? !encoding.equals(that.encoding) : that.encoding != null) { return false; } return false;
}
if (encoding != null ? !encoding.equals(that.encoding) : that.encoding != null) {
return false;
}
if (encodingScheme != null ? !encodingScheme.equals(that.encodingScheme) : that.encodingScheme != null) { if (encodingScheme != null ? !encodingScheme.equals(that.encodingScheme) : that.encodingScheme != null) {
return false; return false;
} }
if (version != null ? !version.equals(that.version) : that.version != null) { return false; } if (version != null ? !version.equals(that.version) : that.version != null) {
return false;
}
return true; return true;
} }

View File

@ -54,15 +54,27 @@ public abstract class XmlElement {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlElement that = (XmlElement) o; XmlElement that = (XmlElement) o;
if (!name.equals(that.name)) { return false; } if (!name.equals(that.name)) {
if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) { return false; } return false;
if (namespaces != null ? !namespaces.equals(that.namespaces) : that.namespaces != null) { return false; } }
if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) { return false; } if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) {
return false;
}
if (namespaces != null ? !namespaces.equals(that.namespaces) : that.namespaces != null) {
return false;
}
if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) {
return false;
}
return true; return true;
} }

View File

@ -35,13 +35,21 @@ public class XmlElementStart extends XmlElement {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
if (!super.equals(o)) { return false; } }
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
XmlElementStart that = (XmlElementStart) o; XmlElementStart that = (XmlElementStart) o;
if (attributes != null ? !attributes.equals(that.attributes) : that.attributes != null) { return false; } if (attributes != null ? !attributes.equals(that.attributes) : that.attributes != null) {
return false;
}
return true; return true;
} }

View File

@ -38,13 +38,21 @@ public class XmlEntityReference {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlEntityReference that = (XmlEntityReference) o; XmlEntityReference that = (XmlEntityReference) o;
if (name != null ? !name.equals(that.name) : that.name != null) { return false; } if (name != null ? !name.equals(that.name) : that.name != null) {
if (text != null ? !text.equals(that.text) : that.text != null) { return false; } return false;
}
if (text != null ? !text.equals(that.text) : that.text != null) {
return false;
}
return true; return true;
} }

View File

@ -38,13 +38,21 @@ public class XmlNamespace {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlNamespace that = (XmlNamespace) o; XmlNamespace that = (XmlNamespace) o;
if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) { return false; } if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) {
if (uri != null ? !uri.equals(that.uri) : that.uri != null) { return false; } return false;
}
if (uri != null ? !uri.equals(that.uri) : that.uri != null) {
return false;
}
return true; return true;
} }

View File

@ -38,13 +38,21 @@ public class XmlProcessingInstruction {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { return true; } if (this == o) {
if (o == null || getClass() != o.getClass()) { return false; } return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlProcessingInstruction that = (XmlProcessingInstruction) o; XmlProcessingInstruction that = (XmlProcessingInstruction) o;
if (data != null ? !data.equals(that.data) : that.data != null) { return false; } if (data != null ? !data.equals(that.data) : that.data != null) {
if (target != null ? !target.equals(that.target) : that.target != null) { return false; } return false;
}
if (target != null ? !target.equals(that.target) : that.target != null) {
return false;
}
return true; return true;
} }

View File

@ -568,7 +568,9 @@ final class Bzip2DivSufSort {
SA[i++] = SA[k]; SA[i++] = SA[k];
SA[k++] = SA[i]; SA[k++] = SA[i];
if (last <= k) { if (last <= k) {
while (j < bufend) { SA[i++] = buf[j]; buf[j++] = SA[i]; } while (j < bufend) {
SA[i++] = buf[j]; buf[j++] = SA[i];
}
SA[i] = buf[j]; buf[j] = t; SA[i] = buf[j]; buf[j] = t;
return; return;
} }

View File

@ -41,11 +41,11 @@ public class DefaultHeadersTest {
private static final class TestDefaultHeaders extends private static final class TestDefaultHeaders extends
DefaultHeaders<CharSequence, CharSequence, TestDefaultHeaders> { DefaultHeaders<CharSequence, CharSequence, TestDefaultHeaders> {
public TestDefaultHeaders() { TestDefaultHeaders() {
this(CharSequenceValueConverter.INSTANCE); this(CharSequenceValueConverter.INSTANCE);
} }
public TestDefaultHeaders(ValueConverter<CharSequence> converter) { TestDefaultHeaders(ValueConverter<CharSequence> converter) {
super(converter); super(converter);
} }
} }

View File

@ -496,8 +496,9 @@ public class ResourceLeakDetector<T> {
*/ */
private static void reachabilityFence0(Object ref) { private static void reachabilityFence0(Object ref) {
if (ref != null) { if (ref != null) {
// Empty synchronized is ok: https://stackoverflow.com/a/31933260/1151521 synchronized (ref) {
synchronized (ref) { } // Empty synchronized is ok: https://stackoverflow.com/a/31933260/1151521
}
} }
} }

View File

@ -158,7 +158,7 @@ public class OcspClientExample {
private final Promise<FullHttpResponse> promise; private final Promise<FullHttpResponse> promise;
public HttpClientHandler(String host, Promise<FullHttpResponse> promise) { HttpClientHandler(String host, Promise<FullHttpResponse> promise) {
this.host = host; this.host = host;
this.promise = promise; this.promise = promise;
} }
@ -204,7 +204,7 @@ public class OcspClientExample {
private static class ExampleOcspClientHandler extends OcspClientHandler { private static class ExampleOcspClientHandler extends OcspClientHandler {
public ExampleOcspClientHandler(ReferenceCountedOpenSslEngine engine) { ExampleOcspClientHandler(ReferenceCountedOpenSslEngine engine) {
super(engine); super(engine);
} }

View File

@ -433,7 +433,9 @@ public class ProxyHandlerTest {
private final TestItem testItem; private final TestItem testItem;
public ProxyHandlerTest(TestItem testItem) { this.testItem = testItem; } public ProxyHandlerTest(TestItem testItem) {
this.testItem = testItem;
}
@Before @Before
public void clearServerExceptions() throws Exception { public void clearServerExceptions() throws Exception {

View File

@ -32,7 +32,7 @@ final class OpenSslJavaxX509Certificate extends X509Certificate {
private final byte[] bytes; private final byte[] bytes;
private X509Certificate wrapped; private X509Certificate wrapped;
public OpenSslJavaxX509Certificate(byte[] bytes) { OpenSslJavaxX509Certificate(byte[] bytes) {
this.bytes = bytes; this.bytes = bytes;
} }

View File

@ -41,7 +41,7 @@ final class OpenSslX509Certificate extends X509Certificate {
private final byte[] bytes; private final byte[] bytes;
private X509Certificate wrapped; private X509Certificate wrapped;
public OpenSslX509Certificate(byte[] bytes) { OpenSslX509Certificate(byte[] bytes) {
this.bytes = bytes; this.bytes = bytes;
} }

View File

@ -34,7 +34,7 @@ class PemValue extends AbstractReferenceCounted implements PemEncoded {
private final boolean sensitive; private final boolean sensitive;
public PemValue(ByteBuf content, boolean sensitive) { PemValue(ByteBuf content, boolean sensitive) {
this.content = ObjectUtil.checkNotNull(content, "content"); this.content = ObjectUtil.checkNotNull(content, "content");
this.sensitive = sensitive; this.sensitive = sensitive;
} }

View File

@ -543,7 +543,7 @@ public class SniHandlerTest {
private static class CustomSslHandler extends SslHandler { private static class CustomSslHandler extends SslHandler {
private final SslContext sslContext; private final SslContext sslContext;
public CustomSslHandler(SslContext sslContext, SSLEngine sslEngine) { CustomSslHandler(SslContext sslContext, SSLEngine sslEngine) {
super(sslEngine); super(sslEngine);
this.sslContext = ObjectUtil.checkNotNull(sslContext, "sslContext"); this.sslContext = ObjectUtil.checkNotNull(sslContext, "sslContext");
} }

View File

@ -263,7 +263,7 @@ public class SslErrorTest {
private static final class TestCertificateException extends CertificateException { private static final class TestCertificateException extends CertificateException {
private static final long serialVersionUID = -5816338303868751410L; private static final long serialVersionUID = -5816338303868751410L;
public TestCertificateException(Throwable cause) { TestCertificateException(Throwable cause) {
super(cause); super(cause);
} }
} }

View File

@ -460,7 +460,7 @@ public class OcspTest {
private volatile byte[] response; private volatile byte[] response;
public TestClientOcspContext(boolean valid) { TestClientOcspContext(boolean valid) {
this.valid = valid; this.valid = valid;
} }
@ -482,7 +482,7 @@ public class OcspTest {
private final OcspClientCallback callback; private final OcspClientCallback callback;
public OcspClientCallbackHandler(ReferenceCountedOpenSslEngine engine, OcspClientCallback callback) { OcspClientCallbackHandler(ReferenceCountedOpenSslEngine engine, OcspClientCallback callback) {
super(engine); super(engine);
this.callback = callback; this.callback = callback;
} }
@ -497,7 +497,7 @@ public class OcspTest {
private static final class OcspTestException extends IllegalStateException { private static final class OcspTestException extends IllegalStateException {
private static final long serialVersionUID = 4516426833250228159L; private static final long serialVersionUID = 4516426833250228159L;
public OcspTestException(String message) { OcspTestException(String message) {
super(message); super(message);
} }
} }

View File

@ -317,7 +317,7 @@ public class IdleStateHandlerTest {
private long ticksInNanos; private long ticksInNanos;
public TestableIdleStateHandler(boolean observeOutput, TestableIdleStateHandler(boolean observeOutput,
long readerIdleTime, long writerIdleTime, long allIdleTime, long readerIdleTime, long writerIdleTime, long allIdleTime,
TimeUnit unit) { TimeUnit unit) {
super(observeOutput, readerIdleTime, writerIdleTime, allIdleTime, unit); super(observeOutput, readerIdleTime, writerIdleTime, allIdleTime, unit);
@ -369,7 +369,7 @@ public class IdleStateHandlerTest {
private static class ObservableChannel extends EmbeddedChannel { private static class ObservableChannel extends EmbeddedChannel {
public ObservableChannel(ChannelHandler... handlers) { ObservableChannel(ChannelHandler... handlers) {
super(handlers); super(handlers);
} }

View File

@ -49,7 +49,7 @@ public final class HpackBenchmarkUtil {
final HpackHeadersSize size; final HpackHeadersSize size;
final boolean limitToAscii; final boolean limitToAscii;
public HeadersKey(HpackHeadersSize size, boolean limitToAscii) { HeadersKey(HpackHeadersSize size, boolean limitToAscii) {
this.size = size; this.size = size;
this.limitToAscii = limitToAscii; this.limitToAscii = limitToAscii;
} }

View File

@ -71,7 +71,7 @@ public class BurstCostExecutorsBenchmark extends AbstractMicrobenchmark {
private final AtomicBoolean poisoned = new AtomicBoolean(); private final AtomicBoolean poisoned = new AtomicBoolean();
private final Thread executorThread; private final Thread executorThread;
public SpinExecutorService(int maxTasks) { SpinExecutorService(int maxTasks) {
tasks = PlatformDependent.newFixedMpscQueue(maxTasks); tasks = PlatformDependent.newFixedMpscQueue(maxTasks);
executorThread = new Thread(new Runnable() { executorThread = new Thread(new Runnable() {
@Override @Override

View File

@ -247,7 +247,7 @@
<netty.dev.tools.directory>${project.build.directory}/dev-tools</netty.dev.tools.directory> <netty.dev.tools.directory>${project.build.directory}/dev-tools</netty.dev.tools.directory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<netty.build.version>22</netty.build.version> <netty.build.version>23</netty.build.version>
<jboss.marshalling.version>1.4.11.Final</jboss.marshalling.version> <jboss.marshalling.version>1.4.11.Final</jboss.marshalling.version>
<jetty.alpnAgent.version>2.0.8</jetty.alpnAgent.version> <jetty.alpnAgent.version>2.0.8</jetty.alpnAgent.version>
<jetty.alpnAgent.path>"${settings.localRepository}"/org/mortbay/jetty/alpn/jetty-alpn-agent/${jetty.alpnAgent.version}/jetty-alpn-agent-${jetty.alpnAgent.version}.jar</jetty.alpnAgent.path> <jetty.alpnAgent.path>"${settings.localRepository}"/org/mortbay/jetty/alpn/jetty-alpn-agent/${jetty.alpnAgent.version}/jetty-alpn-agent-${jetty.alpnAgent.version}.jar</jetty.alpnAgent.path>
@ -754,7 +754,7 @@
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.12.1</version> <version>3.0.0</version>
<executions> <executions>
<execution> <execution>
<id>check-style</id> <id>check-style</id>
@ -768,7 +768,10 @@
<failsOnError>true</failsOnError> <failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation> <failOnViolation>true</failOnViolation>
<configLocation>io/netty/checkstyle.xml</configLocation> <configLocation>io/netty/checkstyle.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory> <sourceDirectories>
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
</sourceDirectories>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

View File

@ -161,7 +161,6 @@
<goal>generate</goal> <goal>generate</goal>
<goal>build</goal> <goal>build</goal>
</goals> </goals>
<phase>compile</phase>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -389,7 +389,9 @@ abstract class AbstractEpollChannel extends AbstractChannel implements UnixChann
*/ */
abstract void epollInReady(); abstract void epollInReady();
final void epollInBefore() { maybeMoreDataToRead = false; } final void epollInBefore() {
maybeMoreDataToRead = false;
}
final void epollInFinally(ChannelConfig config) { final void epollInFinally(ChannelConfig config) {
maybeMoreDataToRead = allocHandle.maybeMoreDataToRead(); maybeMoreDataToRead = allocHandle.maybeMoreDataToRead();

View File

@ -18,7 +18,7 @@ package io.netty.channel.epoll;
import io.netty.channel.RecvByteBufAllocator; import io.netty.channel.RecvByteBufAllocator;
final class EpollRecvByteAllocatorStreamingHandle extends EpollRecvByteAllocatorHandle { final class EpollRecvByteAllocatorStreamingHandle extends EpollRecvByteAllocatorHandle {
public EpollRecvByteAllocatorStreamingHandle(RecvByteBufAllocator.ExtendedHandle handle) { EpollRecvByteAllocatorStreamingHandle(RecvByteBufAllocator.ExtendedHandle handle) {
super(handle); super(handle);
} }

View File

@ -40,7 +40,7 @@ final class LinuxSocket extends Socket {
private static final ClosedChannelException SENDFILE_CLOSED_CHANNEL_EXCEPTION = ThrowableUtil.unknownStackTrace( private static final ClosedChannelException SENDFILE_CLOSED_CHANNEL_EXCEPTION = ThrowableUtil.unknownStackTrace(
new ClosedChannelException(), Native.class, "sendfile(...)"); new ClosedChannelException(), Native.class, "sendfile(...)");
public LinuxSocket(int fd) { LinuxSocket(int fd) {
super(fd); super(fd);
} }

View File

@ -296,7 +296,7 @@ public class EpollSpliceTest {
volatile ChannelFuture future; volatile ChannelFuture future;
final AtomicReference<Throwable> exception = new AtomicReference<>(); final AtomicReference<Throwable> exception = new AtomicReference<>();
public SpliceHandler(File file) { SpliceHandler(File file) {
this.file = file; this.file = file;
} }

View File

@ -90,7 +90,6 @@
<goal>generate</goal> <goal>generate</goal>
<goal>build</goal> <goal>build</goal>
</goals> </goals>
<phase>compile</phase>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
@ -198,7 +197,6 @@
<goal>generate</goal> <goal>generate</goal>
<goal>build</goal> <goal>build</goal>
</goals> </goals>
<phase>compile</phase>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
@ -305,7 +303,6 @@
<goal>generate</goal> <goal>generate</goal>
<goal>build</goal> <goal>build</goal>
</goals> </goals>
<phase>compile</phase>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -392,7 +392,9 @@ abstract class AbstractKQueueChannel extends AbstractChannel implements UnixChan
abstract void readReady(KQueueRecvByteAllocatorHandle allocHandle); abstract void readReady(KQueueRecvByteAllocatorHandle allocHandle);
final void readReadyBefore() { maybeMoreDataToRead = false; } final void readReadyBefore() {
maybeMoreDataToRead = false;
}
final void readReadyFinally(ChannelConfig config) { final void readReadyFinally(ChannelConfig config) {
maybeMoreDataToRead = allocHandle.maybeMoreDataToRead(); maybeMoreDataToRead = allocHandle.maybeMoreDataToRead();

View File

@ -95,7 +95,7 @@ public class AdaptiveRecvByteBufAllocator extends DefaultMaxMessagesRecvByteBufA
private int nextReceiveBufferSize; private int nextReceiveBufferSize;
private boolean decreaseNow; private boolean decreaseNow;
public HandleImpl(int minIndex, int maxIndex, int initial) { HandleImpl(int minIndex, int maxIndex, int initial) {
this.minIndex = minIndex; this.minIndex = minIndex;
this.maxIndex = maxIndex; this.maxIndex = maxIndex;

View File

@ -26,7 +26,7 @@ public class FixedRecvByteBufAllocator extends DefaultMaxMessagesRecvByteBufAllo
private final class HandleImpl extends MaxMessageHandle { private final class HandleImpl extends MaxMessageHandle {
private final int bufferSize; private final int bufferSize;
public HandleImpl(int bufferSize) { HandleImpl(int bufferSize) {
this.bufferSize = bufferSize; this.bufferSize = bufferSize;
} }

View File

@ -99,7 +99,7 @@ public class AbstractChannelTest {
public void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) { } public void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) { }
} }
public TestChannel(EventLoop eventLoop) { TestChannel(EventLoop eventLoop) {
super(null, eventLoop); super(null, eventLoop);
} }

View File

@ -293,7 +293,7 @@ public class DefaultChannelPipelineTailTest {
private class MyChannelPipeline extends DefaultChannelPipeline { private class MyChannelPipeline extends DefaultChannelPipeline {
public MyChannelPipeline(Channel channel) { MyChannelPipeline(Channel channel) {
super(channel); super(channel);
} }