From 1c69448e2ee7d15443f005ea69f2234a8e39ef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E6=99=BA=E5=86=AC?= Date: Wed, 9 Oct 2019 21:12:52 +0800 Subject: [PATCH] Fix typos in javadocs (#9527) Motivation: We should have correct docs without typos Modification: Fix typos and spelling Result: More correct docs --- .../handler/codec/haproxy/HAProxyMessage.java | 2 +- .../handler/codec/http/HttpContentDecoder.java | 2 +- .../io/netty/handler/codec/http/HttpMessage.java | 2 +- .../handler/codec/http/HttpObjectDecoder.java | 2 +- .../java/io/netty/handler/codec/http/HttpUtil.java | 2 +- .../handler/codec/http/QueryStringDecoder.java | 4 ++-- .../handler/codec/http/QueryStringEncoder.java | 2 +- .../netty/handler/codec/http/cors/CorsConfig.java | 2 +- .../handler/codec/http/cors/CorsConfigBuilder.java | 2 +- .../http/multipart/HttpPostRequestEncoder.java | 2 +- .../http/websocketx/WebSocketClientHandshaker.java | 8 ++++---- .../http/websocketx/WebSocketServerHandshaker.java | 4 ++-- .../codec/http/HttpObjectAggregatorTest.java | 2 +- .../handler/codec/http/HttpRequestDecoderTest.java | 2 +- .../codec/http/HttpResponseDecoderTest.java | 2 +- .../AbstractHttp2ConnectionHandlerBuilder.java | 4 ++-- .../http2/DelegatingDecompressorFrameListener.java | 2 +- .../netty/handler/codec/http2/Http2Exception.java | 6 +++--- .../netty/handler/codec/http2/Http2FrameCodec.java | 6 +++--- .../codec/http2/Http2FrameCodecBuilder.java | 4 ++-- .../handler/codec/http2/Http2FrameStream.java | 2 +- .../codec/http2/Http2FrameStreamException.java | 2 +- .../codec/http2/Http2MultiplexCodecBuilder.java | 4 ++-- .../handler/codec/http2/HttpConversionUtil.java | 14 +++++++------- .../handler/codec/http2/Http2MultiplexTest.java | 2 +- .../example/http/upload/HttpUploadServer.java | 2 +- .../http/upload/HttpUploadServerHandler.java | 4 ++-- .../http/websocketx/server/WebSocketServer.java | 2 +- .../http2/helloworld/frame/server/Http2Server.java | 2 +- .../helloworld/multiplex/server/Http2Server.java | 2 +- .../http2/helloworld/server/Http2Server.java | 2 +- .../io/netty/example/http2/tiles/Http2Server.java | 2 +- .../io/netty/example/http2/tiles/HttpServer.java | 2 +- .../io/netty/example/ocsp/OcspClientExample.java | 4 ++-- .../io/netty/example/ocsp/OcspServerExample.java | 2 +- .../io/netty/handler/flow/FlowControlHandler.java | 2 +- .../ssl/ApplicationProtocolNegotiationHandler.java | 2 +- .../io/netty/handler/ssl/OpenSslEngineTest.java | 2 +- .../java/io/netty/handler/ssl/SSLEngineTest.java | 2 +- .../http/HttpRequestDecoderBenchmark.java | 2 +- .../java/io/netty/testsuite/http2/Http2Server.java | 2 +- 41 files changed, 61 insertions(+), 61 deletions(-) diff --git a/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java b/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java index d0354071b0..f10622202c 100644 --- a/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java +++ b/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java @@ -271,7 +271,7 @@ public final class HAProxyMessage extends AbstractReferenceCounted { return new HAProxySSLTLV(verify, client, encapsulatedTlvs, rawContent); } return new HAProxySSLTLV(verify, client, Collections.emptyList(), rawContent); - // If we're not dealing with a SSL Type, we can use the same mechanism + // If we're not dealing with an SSL Type, we can use the same mechanism case PP2_TYPE_ALPN: case PP2_TYPE_AUTHORITY: case PP2_TYPE_SSL_VERSION: diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecoder.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecoder.java index eb7b7c0a6c..d2513e4a5a 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecoder.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecoder.java @@ -132,7 +132,7 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder * This is equivalent to calling {@link #decodeComponent(String, Charset)} * with the UTF-8 charset (recommended to comply with RFC 3986, Section 2). @@ -282,7 +282,7 @@ public class QueryStringDecoder { } /** - * Decodes a bit of an URL encoded by a browser. + * Decodes a bit of a URL encoded by a browser. *

* The string is expected to be encoded as per RFC 3986, Section 2. * This is the encoding used by JavaScript functions {@code encodeURI} diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringEncoder.java b/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringEncoder.java index 123f5db2bb..dd2682ea23 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringEncoder.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/QueryStringEncoder.java @@ -28,7 +28,7 @@ import java.nio.charset.Charset; import java.util.Objects; /** - * Creates an URL-encoded URI from a path string and key-value parameter pairs. + * Creates a URL-encoded URI from a path string and key-value parameter pairs. * This encoder is for one time use only. Create a new instance for each URI. * *

diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfig.java b/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfig.java
index 317e44517f..8b2d96198b 100644
--- a/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfig.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfig.java
@@ -219,7 +219,7 @@ public final class CorsConfig {
      *
      * CORS headers are set after a request is processed. This may not always be desired
      * and this setting will check that the Origin is valid and if it is not valid no
-     * further processing will take place, and a error will be returned to the calling client.
+     * further processing will take place, and an error will be returned to the calling client.
      *
      * @return {@code true} if a CORS request should short-circuit upon receiving an invalid Origin header.
      */
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfigBuilder.java b/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfigBuilder.java
index 6b1c083149..cac4dda893 100644
--- a/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfigBuilder.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfigBuilder.java
@@ -341,7 +341,7 @@ public final class CorsConfigBuilder {
      *
      * CORS headers are set after a request is processed. This may not always be desired
      * and this setting will check that the Origin is valid and if it is not valid no
-     * further processing will take place, and a error will be returned to the calling client.
+     * further processing will take place, and an error will be returned to the calling client.
      *
      * @return {@link CorsConfigBuilder} to support method chaining.
      */
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java b/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java
index edfdf2ba4a..ea6e205d1f 100755
--- a/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java
@@ -865,7 +865,7 @@ public class HttpPostRequestEncoder implements ChunkedInput {
 
     /**
      *
-     * @return the next ByteBuf to send as a HttpChunk and modifying currentBuffer accordingly
+     * @return the next ByteBuf to send as an HttpChunk and modifying currentBuffer accordingly
      */
     private ByteBuf fillByteBuf() {
         int length = currentBuffer.readableBytes();
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
index 4dd29d80d3..564854e702 100644
--- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
@@ -254,7 +254,7 @@ public abstract class WebSocketClientHandshaker {
             HttpClientCodec codec = pipeline.get(HttpClientCodec.class);
             if (codec == null) {
                promise.setFailure(new IllegalStateException("ChannelPipeline does not contain " +
-                       "a HttpResponseDecoder or HttpClientCodec"));
+                       "an HttpResponseDecoder or HttpClientCodec"));
                return promise;
             }
         }
@@ -270,7 +270,7 @@ public abstract class WebSocketClientHandshaker {
                 }
                 if (ctx == null) {
                     promise.setFailure(new IllegalStateException("ChannelPipeline does not contain " +
-                            "a HttpRequestEncoder or HttpClientCodec"));
+                            "an HttpRequestEncoder or HttpClientCodec"));
                     return;
                 }
                 p.addAfter(ctx.name(), "ws-encoder", newWebSocketEncoder());
@@ -347,7 +347,7 @@ public abstract class WebSocketClientHandshaker {
             ctx = p.context(HttpClientCodec.class);
             if (ctx == null) {
                 throw new IllegalStateException("ChannelPipeline does not contain " +
-                        "a HttpRequestEncoder or HttpClientCodec");
+                        "an HttpRequestEncoder or HttpClientCodec");
             }
             final HttpClientCodec codec =  (HttpClientCodec) ctx.handler();
             // Remove the encoder part of the codec as the user may start writing frames after this method returns.
@@ -416,7 +416,7 @@ public abstract class WebSocketClientHandshaker {
                 ctx = p.context(HttpClientCodec.class);
                 if (ctx == null) {
                     return promise.setFailure(new IllegalStateException("ChannelPipeline does not contain " +
-                            "a HttpResponseDecoder or HttpClientCodec"));
+                            "an HttpResponseDecoder or HttpClientCodec"));
                 }
             }
             // Add aggregator and ensure we feed the HttpResponse so it is aggregated. A limit of 8192 should be more
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java
index 38997d07ac..5ba5d32621 100644
--- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java
@@ -204,7 +204,7 @@ public abstract class WebSocketServerHandshaker {
         ChannelHandlerContext ctx = p.context(HttpRequestDecoder.class);
         final String encoderName;
         if (ctx == null) {
-            // this means the user use a HttpServerCodec
+            // this means the user use an HttpServerCodec
             ctx = p.context(HttpServerCodec.class);
             if (ctx == null) {
                 promise.setFailure(
@@ -275,7 +275,7 @@ public abstract class WebSocketServerHandshaker {
         ChannelPipeline p = channel.pipeline();
         ChannelHandlerContext ctx = p.context(HttpRequestDecoder.class);
         if (ctx == null) {
-            // this means the user use a HttpServerCodec
+            // this means the user use an HttpServerCodec
             ctx = p.context(HttpServerCodec.class);
             if (ctx == null) {
                 promise.setFailure(
diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java
index f963d2d207..1a97659e90 100644
--- a/codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java
+++ b/codec-http/src/test/java/io/netty/handler/codec/http/HttpObjectAggregatorTest.java
@@ -197,7 +197,7 @@ public class HttpObjectAggregatorTest {
 
     @Test
     public void testOversizedRequestWithoutKeepAlive() {
-        // send a HTTP/1.0 request with no keep-alive header
+        // send an HTTP/1.0 request with no keep-alive header
         HttpRequest message = new DefaultHttpRequest(HttpVersion.HTTP_1_0, HttpMethod.PUT, "http://localhost");
         HttpUtil.setContentLength(message, 5);
         checkOversizedRequest(message);
diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java
index 9e1fa604b7..b243f2de99 100644
--- a/codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java
+++ b/codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java
@@ -145,7 +145,7 @@ public class HttpRequestDecoderTest {
                 amount = headerLength -  a;
             }
 
-            // if header is done it should produce a HttpRequest
+            // if header is done it should produce an HttpRequest
             channel.writeInbound(Unpooled.copiedBuffer(content, a, amount));
             a += amount;
         }
diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java
index 52dda57157..b1f92c9133 100644
--- a/codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java
+++ b/codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java
@@ -397,7 +397,7 @@ public class HttpResponseDecoderTest {
                 amount = headerLength -  a;
             }
 
-            // if header is done it should produce a HttpRequest
+            // if header is done it should produce an HttpRequest
             boolean headerDone = a + amount == headerLength;
             assertEquals(headerDone, ch.writeInbound(Unpooled.copiedBuffer(content, a, amount)));
             a += amount;
diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
index de2adf40dd..f8c8fc0724 100644
--- a/codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
+++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
@@ -85,7 +85,7 @@ public abstract class AbstractHttp2ConnectionHandlerBuilderThis API is very immature. The Http2Connection-based API is currently preferred over this API.
  * This API is targeted to eventually replace or reduce the need for the {@link Http2ConnectionHandler} API.
  *
- * 

A HTTP/2 handler that maps HTTP/2 frames to {@link Http2Frame} objects and vice versa. For every incoming HTTP/2 - * frame, a {@link Http2Frame} object is created and propagated via {@link #channelRead}. Outbound {@link Http2Frame} + *

An HTTP/2 handler that maps HTTP/2 frames to {@link Http2Frame} objects and vice versa. For every incoming HTTP/2 + * frame, an {@link Http2Frame} object is created and propagated via {@link #channelRead}. Outbound {@link Http2Frame} * objects received via {@link #write} are converted to the HTTP/2 wire format. HTTP/2 frames specific to a stream * implement the {@link Http2StreamFrame} interface. The {@link Http2FrameCodec} is instantiated using the * {@link Http2FrameCodecBuilder}. It's recommended for channel handlers to inherit from the @@ -78,7 +78,7 @@ import static io.netty.handler.codec.http2.Http2Error.NO_ERROR; * *

New inbound Streams

* - * The first frame of a HTTP/2 stream must be a {@link Http2HeadersFrame}, which will have a {@link Http2FrameStream} + * The first frame of an HTTP/2 stream must be an {@link Http2HeadersFrame}, which will have an {@link Http2FrameStream} * object attached. * *

New outbound Streams

diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodecBuilder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodecBuilder.java index aeaccdf657..1469f7cc5c 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodecBuilder.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodecBuilder.java @@ -36,14 +36,14 @@ public class Http2FrameCodecBuilder extends } /** - * Creates a builder for a HTTP/2 client. + * Creates a builder for an HTTP/2 client. */ public static Http2FrameCodecBuilder forClient() { return new Http2FrameCodecBuilder(false); } /** - * Creates a builder for a HTTP/2 server. + * Creates a builder for an HTTP/2 server. */ public static Http2FrameCodecBuilder forServer() { return new Http2FrameCodecBuilder(true); diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStream.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStream.java index 13f8634e1c..533800f8cd 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStream.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStream.java @@ -20,7 +20,7 @@ import io.netty.handler.codec.http2.Http2Stream.State; import io.netty.util.internal.UnstableApi; /** - * A single stream within a HTTP/2 connection. To be used with the {@link Http2FrameCodec}. + * A single stream within an HTTP/2 connection. To be used with the {@link Http2FrameCodec}. */ @UnstableApi public interface Http2FrameStream { diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStreamException.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStreamException.java index 307bf504a3..0d824c5d86 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStreamException.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameStreamException.java @@ -21,7 +21,7 @@ import io.netty.util.internal.UnstableApi; import static java.util.Objects.requireNonNull; /** - * A HTTP/2 exception for a specific {@link Http2FrameStream}. + * An HTTP/2 exception for a specific {@link Http2FrameStream}. */ @UnstableApi public final class Http2FrameStreamException extends Exception { diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilder.java index 29e8e74015..35537b5246 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilder.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodecBuilder.java @@ -57,7 +57,7 @@ public class Http2MultiplexCodecBuilder } /** - * Creates a builder for a HTTP/2 client. + * Creates a builder for an HTTP/2 client. * * @param childHandler the handler added to channels for remotely-created streams. It must be * {@link ChannelHandler.Sharable}. @@ -67,7 +67,7 @@ public class Http2MultiplexCodecBuilder } /** - * Creates a builder for a HTTP/2 server. + * Creates a builder for an HTTP/2 server. * * @param childHandler the handler added to channels for remotely-created streams. It must be * {@link ChannelHandler.Sharable}. diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java index 40d222ac6b..69f5454be3 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java @@ -122,28 +122,28 @@ public final class HttpConversionUtil { */ public enum ExtensionHeaderNames { /** - * HTTP extension header which will identify the stream id from the HTTP/2 event(s) responsible for generating a - * {@code HttpObject} + * HTTP extension header which will identify the stream id from the HTTP/2 event(s) responsible for + * generating an {@code HttpObject} *

* {@code "x-http2-stream-id"} */ STREAM_ID("x-http2-stream-id"), /** * HTTP extension header which will identify the scheme pseudo header from the HTTP/2 event(s) responsible for - * generating a {@code HttpObject} + * generating an {@code HttpObject} *

* {@code "x-http2-scheme"} */ SCHEME("x-http2-scheme"), /** * HTTP extension header which will identify the path pseudo header from the HTTP/2 event(s) responsible for - * generating a {@code HttpObject} + * generating an {@code HttpObject} *

* {@code "x-http2-path"} */ PATH("x-http2-path"), /** - * HTTP extension header which will identify the stream id used to create this stream in a HTTP/2 push promise + * HTTP extension header which will identify the stream id used to create this stream in an HTTP/2 push promise * frame *

* {@code "x-http2-stream-promise-id"} @@ -158,7 +158,7 @@ public final class HttpConversionUtil { STREAM_DEPENDENCY_ID("x-http2-stream-dependency-id"), /** * HTTP extension header which will identify the weight (if non-default and the priority is not on the default - * stream) of the associated HTTP/2 stream responsible responsible for generating a {@code HttpObject} + * stream) of the associated HTTP/2 stream responsible responsible for generating an {@code HttpObject} *

* {@code "x-http2-stream-weight"} */ @@ -519,7 +519,7 @@ public final class HttpConversionUtil { } /** - * Generate a HTTP/2 {code :path} from a URI in accordance with + * Generate an HTTP/2 {code :path} from a URI in accordance with * rfc7230, 5.3. */ private static AsciiString toHttp2Path(URI uri) { diff --git a/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java b/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java index 0c055ae61e..7a341e7b3c 100644 --- a/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java +++ b/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java @@ -387,7 +387,7 @@ public abstract class Http2MultiplexTest { } /** - * A child channel for a HTTP/2 stream in IDLE state (that is no headers sent or received), + * A child channel for an HTTP/2 stream in IDLE state (that is no headers sent or received), * should not emit a RST_STREAM frame on close, as this is a connection error of type protocol error. */ @Test diff --git a/example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java b/example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java index 5dd486016b..8135318541 100644 --- a/example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java +++ b/example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java @@ -28,7 +28,7 @@ import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.util.SelfSignedCertificate; /** - * A HTTP server showing how to use the HTTP multipart package for file uploads and decoding post data. + * An HTTP server showing how to use the HTTP multipart package for file uploads and decoding post data. */ public final class HttpUploadServer { diff --git a/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java b/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java index f5e8030f5c..7c1c378471 100644 --- a/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java +++ b/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java @@ -142,9 +142,9 @@ public class HttpUploadServerHandler extends SimpleChannelInboundHandlerThis example is making use of the "multiplexing" http2 API, where streams are mapped to child diff --git a/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2Server.java b/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2Server.java index 86056509aa..c09e3c2d3f 100644 --- a/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2Server.java +++ b/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2Server.java @@ -39,7 +39,7 @@ import io.netty.handler.ssl.SupportedCipherSuiteFilter; import io.netty.handler.ssl.util.SelfSignedCertificate; /** - * A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the + * An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the * server with the example client. * *

This example is making use of the "multiplexing" http2 API, where streams are mapped to child diff --git a/example/src/main/java/io/netty/example/http2/helloworld/server/Http2Server.java b/example/src/main/java/io/netty/example/http2/helloworld/server/Http2Server.java index 91336baec4..7fb0d3b6e5 100644 --- a/example/src/main/java/io/netty/example/http2/helloworld/server/Http2Server.java +++ b/example/src/main/java/io/netty/example/http2/helloworld/server/Http2Server.java @@ -39,7 +39,7 @@ import io.netty.handler.ssl.SupportedCipherSuiteFilter; import io.netty.handler.ssl.util.SelfSignedCertificate; /** - * A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the + * An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the * server with the example client. */ public final class Http2Server { diff --git a/example/src/main/java/io/netty/example/http2/tiles/Http2Server.java b/example/src/main/java/io/netty/example/http2/tiles/Http2Server.java index 2a50c5a248..1a95f36368 100644 --- a/example/src/main/java/io/netty/example/http2/tiles/Http2Server.java +++ b/example/src/main/java/io/netty/example/http2/tiles/Http2Server.java @@ -40,7 +40,7 @@ import java.security.cert.CertificateException; import javax.net.ssl.SSLException; /** - * Demonstrates a Http2 server using Netty to display a bunch of images and + * Demonstrates an Http2 server using Netty to display a bunch of images and * simulate latency. It is a Netty version of the * Go lang HTTP2 tiles demo. */ diff --git a/example/src/main/java/io/netty/example/http2/tiles/HttpServer.java b/example/src/main/java/io/netty/example/http2/tiles/HttpServer.java index f46d01afd2..125509f9f3 100644 --- a/example/src/main/java/io/netty/example/http2/tiles/HttpServer.java +++ b/example/src/main/java/io/netty/example/http2/tiles/HttpServer.java @@ -31,7 +31,7 @@ import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; /** - * Demonstrates a http server using Netty to display a bunch of images, simulate + * Demonstrates an http server using Netty to display a bunch of images, simulate * latency and compare it against the http2 implementation. */ public final class HttpServer { diff --git a/example/src/main/java/io/netty/example/ocsp/OcspClientExample.java b/example/src/main/java/io/netty/example/ocsp/OcspClientExample.java index 250ded1c43..7ea6c3ef75 100644 --- a/example/src/main/java/io/netty/example/ocsp/OcspClientExample.java +++ b/example/src/main/java/io/netty/example/ocsp/OcspClientExample.java @@ -59,8 +59,8 @@ import io.netty.util.ReferenceCountUtil; import io.netty.util.concurrent.Promise; /** - * This is a very simple example for a HTTPS client that uses OCSP stapling. - * The client connects to a HTTPS server that has OCSP stapling enabled and + * This is a very simple example for an HTTPS client that uses OCSP stapling. + * The client connects to an HTTPS server that has OCSP stapling enabled and * then uses BC to parse and validate it. */ public class OcspClientExample { diff --git a/example/src/main/java/io/netty/example/ocsp/OcspServerExample.java b/example/src/main/java/io/netty/example/ocsp/OcspServerExample.java index b94646cb54..ce65b271b5 100644 --- a/example/src/main/java/io/netty/example/ocsp/OcspServerExample.java +++ b/example/src/main/java/io/netty/example/ocsp/OcspServerExample.java @@ -71,7 +71,7 @@ public class OcspServerExample { X509Certificate issuer = keyCertChain[keyCertChain.length - 1]; // Step 2: We need the URL of the CA's OCSP responder server. It's somewhere encoded - // into the certificate! Notice that it's a HTTP URL. + // into the certificate! Notice that it's an HTTP URL. URI uri = OcspUtils.ocspUri(certificate); System.out.println("OCSP Responder URI: " + uri); diff --git a/handler/src/main/java/io/netty/handler/flow/FlowControlHandler.java b/handler/src/main/java/io/netty/handler/flow/FlowControlHandler.java index f46ea265e6..6cb52e4cf6 100644 --- a/handler/src/main/java/io/netty/handler/flow/FlowControlHandler.java +++ b/handler/src/main/java/io/netty/handler/flow/FlowControlHandler.java @@ -36,7 +36,7 @@ import io.netty.util.internal.logging.InternalLoggerFactory; * many events as they like for any given input. A channel's auto reading configuration doesn't usually * apply in these scenarios. This is causing problems in downstream {@link ChannelHandler}s that would * like to hold subsequent events while they're processing one event. It's a common problem with the - * {@code HttpObjectDecoder} that will very often fire a {@code HttpRequest} that is immediately followed + * {@code HttpObjectDecoder} that will very often fire an {@code HttpRequest} that is immediately followed * by a {@code LastHttpContent} event. * *

{@code
diff --git a/handler/src/main/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandler.java b/handler/src/main/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandler.java
index 7cec73cc26..da9232fd3a 100644
--- a/handler/src/main/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandler.java
+++ b/handler/src/main/java/io/netty/handler/ssl/ApplicationProtocolNegotiationHandler.java
@@ -86,7 +86,7 @@ public abstract class ApplicationProtocolNegotiationHandler implements ChannelIn
                 if (handshakeEvent.isSuccess()) {
                     SslHandler sslHandler = ctx.pipeline().get(SslHandler.class);
                     if (sslHandler == null) {
-                        throw new IllegalStateException("cannot find a SslHandler in the pipeline (required for "
+                        throw new IllegalStateException("cannot find an SslHandler in the pipeline (required for "
                                 + "application-level protocol negotiation)");
                     }
                     String protocol = sslHandler.applicationProtocol();
diff --git a/handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java b/handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java
index 20a0345930..075bddce02 100644
--- a/handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java
+++ b/handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java
@@ -498,7 +498,7 @@ public class OpenSslEngineTest extends SSLEngineTest {
 
             ByteBuffer empty = allocateBuffer(0);
             ByteBuffer dst = allocateBuffer(clientEngine.getSession().getPacketBufferSize());
-            // Limit to something that is guaranteed to be too small to hold a SSL Record.
+            // Limit to something that is guaranteed to be too small to hold an SSL Record.
             dst.limit(1);
 
             // As we called closeOutbound() before this should produce a BUFFER_OVERFLOW.
diff --git a/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java b/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java
index c3bc4071e4..0305597cb5 100644
--- a/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java
+++ b/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java
@@ -2297,7 +2297,7 @@ public abstract class SSLEngineTest {
             assertTrue(client.isOutboundDone());
             assertTrue(client.isInboundDone());
 
-            // Ensure that calling wrap or unwrap again will not produce a SSLException
+            // Ensure that calling wrap or unwrap again will not produce an SSLException
             encryptedServerToClient.clear();
             plainServerOut.clear();
 
diff --git a/microbench/src/main/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java b/microbench/src/main/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java
index d2b07a8bf2..fa0ba5cdda 100644
--- a/microbench/src/main/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java
+++ b/microbench/src/main/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java
@@ -98,7 +98,7 @@ public class HttpRequestDecoderBenchmark extends AbstractMicrobenchmark {
                 amount = headerLength -  a;
             }
 
-            // if header is done it should produce a HttpRequest
+            // if header is done it should produce an HttpRequest
             channel.writeInbound(Unpooled.wrappedBuffer(content, a, amount).asReadOnly());
             a += amount;
         }
diff --git a/testsuite-http2/src/main/java/io/netty/testsuite/http2/Http2Server.java b/testsuite-http2/src/main/java/io/netty/testsuite/http2/Http2Server.java
index 8966bdfab7..2fd34ecad5 100644
--- a/testsuite-http2/src/main/java/io/netty/testsuite/http2/Http2Server.java
+++ b/testsuite-http2/src/main/java/io/netty/testsuite/http2/Http2Server.java
@@ -27,7 +27,7 @@ import io.netty.handler.logging.LogLevel;
 import io.netty.handler.logging.LoggingHandler;
 
 /**
- * A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
+ * An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
  * server with the example client.
  */
 public final class Http2Server {