From 4784f2761a1e18c24bbf6bdf3b901873aa598c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Cs=C3=B6g=C3=B6r?= Date: Wed, 16 Mar 2016 18:49:18 +0100 Subject: [PATCH] trivial javadoc fixes - fix the formatting of the diagram in ChannelFuture's javadoc - update external link in AutobahnServer - fix various spelling issues --- .../websockets/autobahn/AutobahnServer.java | 4 ++-- .../java/io/netty/channel/ChannelFuture.java | 24 +++++++++---------- .../io/netty/channel/ChannelPipeline.java | 8 +++---- .../channel/SimpleChannelInboundHandler.java | 6 ++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/testsuite/src/main/java/io/netty/testsuite/websockets/autobahn/AutobahnServer.java b/testsuite/src/main/java/io/netty/testsuite/websockets/autobahn/AutobahnServer.java index a5b9125255..e5a2ad6156 100644 --- a/testsuite/src/main/java/io/netty/testsuite/websockets/autobahn/AutobahnServer.java +++ b/testsuite/src/main/java/io/netty/testsuite/websockets/autobahn/AutobahnServer.java @@ -24,8 +24,8 @@ import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; /** - * A Web Socket echo server for running the autobahn test - * suite + * A Web Socket echo server for running the + * autobahn test suite */ public class AutobahnServer { diff --git a/transport/src/main/java/io/netty/channel/ChannelFuture.java b/transport/src/main/java/io/netty/channel/ChannelFuture.java index 3834c7026d..9652199411 100644 --- a/transport/src/main/java/io/netty/channel/ChannelFuture.java +++ b/transport/src/main/java/io/netty/channel/ChannelFuture.java @@ -44,18 +44,18 @@ import java.util.concurrent.TimeUnit; * +---------------------------+ * | Completed successfully | * +---------------------------+ - * +----> isDone() = true | - * +--------------------------+ | | isSuccess() = true | + * +----> isDone() = true | + * +--------------------------+ | | isSuccess() = true | * | Uncompleted | | +===========================+ * +--------------------------+ | | Completed with failure | - * | isDone() = false | | +---------------------------+ - * | isSuccess() = false |----+----> isDone() = true | - * | isCancelled() = false | | | cause() = non-null | - * | cause() = null | | +===========================+ + * | isDone() = false | | +---------------------------+ + * | isSuccess() = false |----+----> isDone() = true | + * | isCancelled() = false | | | cause() = non-null | + * | cause() = null | | +===========================+ * +--------------------------+ | | Completed by cancellation | * | +---------------------------+ - * +----> isDone() = true | - * | isCancelled() = true | + * +----> isDone() = true | + * | isCancelled() = true | * +---------------------------+ * * @@ -87,15 +87,15 @@ import java.util.concurrent.TimeUnit; * *

Do not call {@link #await()} inside {@link ChannelHandler}

*

- * The event handler methods in {@link ChannelHandler} is usually called by + * The event handler methods in {@link ChannelHandler} are usually called by * an I/O thread. If {@link #await()} is called by an event handler * method, which is called by the I/O thread, the I/O operation it is waiting - * for might never be complete because {@link #await()} can block the I/O + * for might never complete because {@link #await()} can block the I/O * operation it is waiting for, which is a dead lock. *

  * // BAD - NEVER DO THIS
  * {@code @Override}
- * public void channelRead({@link ChannelHandlerContext} ctx, GoodByeMessage msg) {
+ * public void channelRead({@link ChannelHandlerContext} ctx, Object msg) {
  *     {@link ChannelFuture} future = ctx.channel().close();
  *     future.awaitUninterruptibly();
  *     // Perform post-closure operation
@@ -104,7 +104,7 @@ import java.util.concurrent.TimeUnit;
  *
  * // GOOD
  * {@code @Override}
- * public void channelRead({@link ChannelHandlerContext} ctx,  GoodByeMessage msg) {
+ * public void channelRead({@link ChannelHandlerContext} ctx, Object msg) {
  *     {@link ChannelFuture} future = ctx.channel().close();
  *     future.addListener(new {@link ChannelFutureListener}() {
  *         public void operationComplete({@link ChannelFuture} future) {
diff --git a/transport/src/main/java/io/netty/channel/ChannelPipeline.java b/transport/src/main/java/io/netty/channel/ChannelPipeline.java
index 977d9e6e59..6dbad4ea6c 100644
--- a/transport/src/main/java/io/netty/channel/ChannelPipeline.java
+++ b/transport/src/main/java/io/netty/channel/ChannelPipeline.java
@@ -347,7 +347,7 @@ public interface ChannelPipeline
     ChannelPipeline addAfter(EventExecutorGroup group, String baseName, String name, ChannelHandler handler);
 
     /**
-     * Inserts a {@link ChannelHandler}s at the first position of this pipeline.
+     * Inserts {@link ChannelHandler}s at the first position of this pipeline.
      *
      * @param handlers  the handlers to insert first
      *
@@ -355,7 +355,7 @@ public interface ChannelPipeline
     ChannelPipeline addFirst(ChannelHandler... handlers);
 
     /**
-     * Inserts a {@link ChannelHandler}s at the first position of this pipeline.
+     * Inserts {@link ChannelHandler}s at the first position of this pipeline.
      *
      * @param group     the {@link EventExecutorGroup} which will be used to execute the {@link ChannelHandler}s
      *                  methods.
@@ -365,7 +365,7 @@ public interface ChannelPipeline
     ChannelPipeline addFirst(EventExecutorGroup group, ChannelHandler... handlers);
 
     /**
-     * Inserts a {@link ChannelHandler}s at the last position of this pipeline.
+     * Inserts {@link ChannelHandler}s at the last position of this pipeline.
      *
      * @param handlers  the handlers to insert last
      *
@@ -373,7 +373,7 @@ public interface ChannelPipeline
     ChannelPipeline addLast(ChannelHandler... handlers);
 
     /**
-     * Inserts a {@link ChannelHandler}s at the last position of this pipeline.
+     * Inserts {@link ChannelHandler}s at the last position of this pipeline.
      *
      * @param group     the {@link EventExecutorGroup} which will be used to execute the {@link ChannelHandler}s
      *                  methods.
diff --git a/transport/src/main/java/io/netty/channel/SimpleChannelInboundHandler.java b/transport/src/main/java/io/netty/channel/SimpleChannelInboundHandler.java
index 6e2b4aa9f2..6f24447fea 100644
--- a/transport/src/main/java/io/netty/channel/SimpleChannelInboundHandler.java
+++ b/transport/src/main/java/io/netty/channel/SimpleChannelInboundHandler.java
@@ -35,7 +35,7 @@ import io.netty.util.internal.TypeParameterMatcher;
  *     }
  * 
* - * Be aware that depending of the constructor parameters it will release all handled messages by pass them to + * Be aware that depending of the constructor parameters it will release all handled messages by passing them to * {@link ReferenceCountUtil#release(Object)}. In this case you may need to use * {@link ReferenceCountUtil#retain(Object)} if you pass the object to the next handler in the {@link ChannelPipeline}. * @@ -60,7 +60,7 @@ public abstract class SimpleChannelInboundHandler extends ChannelInboundHandl /** * Create a new instance which will try to detect the types to match out of the type parameter of the class. * - * @param autoRelease {@code true} if handled messages should be released automatically by pass them to + * @param autoRelease {@code true} if handled messages should be released automatically by passing them to * {@link ReferenceCountUtil#release(Object)}. */ protected SimpleChannelInboundHandler(boolean autoRelease) { @@ -79,7 +79,7 @@ public abstract class SimpleChannelInboundHandler extends ChannelInboundHandl * Create a new instance * * @param inboundMessageType The type of messages to match - * @param autoRelease {@code true} if handled messages should be released automatically by pass them to + * @param autoRelease {@code true} if handled messages should be released automatically by passing them to * {@link ReferenceCountUtil#release(Object)}. */ protected SimpleChannelInboundHandler(Class inboundMessageType, boolean autoRelease) {