From 6fdd7fcddbe964b2f30d7492a926f4f0bf0f083f Mon Sep 17 00:00:00 2001 From: kashike Date: Sun, 13 Jan 2019 22:24:34 -0800 Subject: [PATCH] Fix minor spelling issues in javadocs (#8701) Motivation: Javadocs contained some spelling errors, we should fix these. Modification: Fix spelling Result: Javadoc cleanup. --- .../io/netty/buffer/CompositeByteBuf.java | 42 +++++++++---------- .../main/java/io/netty/buffer/Unpooled.java | 6 +-- .../netty/handler/codec/http/HttpHeaders.java | 2 +- .../handler/codec/http2/Http2DataFrame.java | 2 +- .../handler/codec/ByteToMessageDecoder.java | 2 +- .../codec/serialization/ClassResolvers.java | 8 ++-- .../java/io/netty/util/HashingStrategy.java | 2 +- .../ssl/ReferenceCountedOpenSslEngine.java | 2 +- .../resolver/dns/DnsNameResolverTest.java | 8 ++-- .../channel/kqueue/KQueueChannelConfig.java | 4 +- .../channel/kqueue/KQueueChannelOption.java | 2 +- .../java/io/netty/channel/kqueue/Native.java | 2 +- .../channel/unix/DomainSocketReadMode.java | 6 ++- .../AbstractCoalescingBufferQueue.java | 2 +- .../io/netty/channel/DefaultFileRegion.java | 4 +- .../java/io/netty/channel/FileRegion.java | 4 +- .../socket/oio/OioDatagramChannel.java | 2 +- 17 files changed, 51 insertions(+), 49 deletions(-) diff --git a/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java b/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java index ce3c9f7f41ea..96c14cd28fee 100644 --- a/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java @@ -158,8 +158,8 @@ private static Component[] newCompArray(int initComponents, int maxNumComponents * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponent(boolean, ByteBuf)}. *

- * {@link ByteBuf#release()} ownership of {@code buffer} is transfered to this {@link CompositeByteBuf}. - * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transfered to this + * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. + * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ public CompositeByteBuf addComponent(ByteBuf buffer) { @@ -172,10 +172,10 @@ public CompositeByteBuf addComponent(ByteBuf buffer) { * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponents(boolean, ByteBuf[])}. *

- * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} - * ownership of all {@link ByteBuf} objects is transfered to this {@link CompositeByteBuf}. + * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ public CompositeByteBuf addComponents(ByteBuf... buffers) { return addComponents(false, buffers); @@ -187,10 +187,10 @@ public CompositeByteBuf addComponents(ByteBuf... buffers) { * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponents(boolean, Iterable)}. *

- * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} - * ownership of all {@link ByteBuf} objects is transfered to this {@link CompositeByteBuf}. + * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ public CompositeByteBuf addComponents(Iterable buffers) { return addComponents(false, buffers); @@ -202,9 +202,9 @@ public CompositeByteBuf addComponents(Iterable buffers) { * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponent(boolean, int, ByteBuf)}. *

- * {@link ByteBuf#release()} ownership of {@code buffer} is transfered to this {@link CompositeByteBuf}. + * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. - * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transfered to this + * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ public CompositeByteBuf addComponent(int cIndex, ByteBuf buffer) { @@ -215,8 +215,8 @@ public CompositeByteBuf addComponent(int cIndex, ByteBuf buffer) { * Add the given {@link ByteBuf} and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. * - * {@link ByteBuf#release()} ownership of {@code buffer} is transfered to this {@link CompositeByteBuf}. - * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transfered to this + * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. + * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ public CompositeByteBuf addComponent(boolean increaseWriterIndex, ByteBuf buffer) { @@ -230,10 +230,10 @@ public CompositeByteBuf addComponent(boolean increaseWriterIndex, ByteBuf buffer * Add the given {@link ByteBuf}s and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. * - * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} - * ownership of all {@link ByteBuf} objects is transfered to this {@link CompositeByteBuf}. + * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ public CompositeByteBuf addComponents(boolean increaseWriterIndex, ByteBuf... buffers) { checkNotNull(buffers, "buffers"); @@ -246,10 +246,10 @@ public CompositeByteBuf addComponents(boolean increaseWriterIndex, ByteBuf... bu * Add the given {@link ByteBuf}s and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. * - * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} - * ownership of all {@link ByteBuf} objects is transfered to this {@link CompositeByteBuf}. + * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ public CompositeByteBuf addComponents(boolean increaseWriterIndex, Iterable buffers) { addComponents0(increaseWriterIndex, componentCount, buffers); @@ -261,9 +261,9 @@ public CompositeByteBuf addComponents(boolean increaseWriterIndex, Iterable - * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. {@link ByteBuf#release()} ownership of all - * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} - * ownership of all {@link ByteBuf} objects is transfered to this {@link CompositeByteBuf}. + * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ public CompositeByteBuf addComponents(int cIndex, ByteBuf... buffers) { checkNotNull(buffers, "buffers"); @@ -405,11 +405,11 @@ private int addComponents0(boolean increaseWriterIndex, int cIndex, * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased you need to handle it by your own. *

- * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all - * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects is transfered to this + * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects is transferred to this * {@link CompositeByteBuf}. */ public CompositeByteBuf addComponents(int cIndex, Iterable buffers) { diff --git a/buffer/src/main/java/io/netty/buffer/Unpooled.java b/buffer/src/main/java/io/netty/buffer/Unpooled.java index 8c7dc77e564b..d7df1928857e 100644 --- a/buffer/src/main/java/io/netty/buffer/Unpooled.java +++ b/buffer/src/main/java/io/netty/buffer/Unpooled.java @@ -219,7 +219,7 @@ public static ByteBuf wrappedBuffer(long memoryAddress, int size, boolean doFree * Creates a new buffer which wraps the specified buffer's readable bytes. * A modification on the specified buffer's content will be visible to the * returned buffer. - * @param buffer The buffer to wrap. Reference count ownership of this variable is transfered to this method. + * @param buffer The buffer to wrap. Reference count ownership of this variable is transferred to this method. * @return The readable portion of the {@code buffer}, or an empty buffer if there is no readable portion. * The caller is responsible for releasing this buffer. */ @@ -245,7 +245,7 @@ public static ByteBuf wrappedBuffer(byte[]... arrays) { * Creates a new big-endian composite buffer which wraps the readable bytes of the * specified buffers without copying them. A modification on the content * of the specified buffers will be visible to the returned buffer. - * @param buffers The buffers to wrap. Reference count ownership of all variables is transfered to this method. + * @param buffers The buffers to wrap. Reference count ownership of all variables is transferred to this method. * @return The readable portion of the {@code buffers}. The caller is responsible for releasing this buffer. */ public static ByteBuf wrappedBuffer(ByteBuf... buffers) { @@ -300,7 +300,7 @@ public static ByteBuf wrappedBuffer(int maxNumComponents, byte[]... arrays) { * of the specified buffers will be visible to the returned buffer. * @param maxNumComponents Advisement as to how many independent buffers are allowed to exist before * consolidation occurs. - * @param buffers The buffers to wrap. Reference count ownership of all variables is transfered to this method. + * @param buffers The buffers to wrap. Reference count ownership of all variables is transferred to this method. * @return The readable portion of the {@code buffers}. The caller is responsible for releasing this buffer. */ public static ByteBuf wrappedBuffer(int maxNumComponents, ByteBuf... buffers) { diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java index 35cfc5c5f181..694bc4d56e44 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java @@ -1695,7 +1695,7 @@ public String toString() { } /** - * Returns a deap copy of the passed in {@link HttpHeaders}. + * Returns a deep copy of the passed in {@link HttpHeaders}. */ public HttpHeaders copy() { return new DefaultHttpHeaders().set(this); diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2DataFrame.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2DataFrame.java index a0d55c487984..2c99e2c287a4 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2DataFrame.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2DataFrame.java @@ -37,7 +37,7 @@ public interface Http2DataFrame extends Http2StreamFrame, ByteBufHolder { ByteBuf content(); /** - * Returns the number of bytes that are flow-controlled initialy, so even if the {@link #content()} is consumed + * Returns the number of bytes that are flow-controlled initially, so even if the {@link #content()} is consumed * this will not change. */ int initialFlowControlledBytes(); diff --git a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java index fec73f8fc9a3..ddf3d9b14fae 100644 --- a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java +++ b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java @@ -134,7 +134,7 @@ public ByteBuf cumulate(ByteBufAllocator alloc, ByteBuf cumulation, ByteBuf in) return buffer; } finally { if (in != null) { - // We must release if the ownership was not transfered as otherwise it may produce a leak if + // We must release if the ownership was not transferred as otherwise it may produce a leak if // writeBytes(...) throw for whatever release (for example because of OutOfMemoryError). in.release(); } diff --git a/codec/src/main/java/io/netty/handler/codec/serialization/ClassResolvers.java b/codec/src/main/java/io/netty/handler/codec/serialization/ClassResolvers.java index 0d8c11f2f9f3..32250ada801b 100644 --- a/codec/src/main/java/io/netty/handler/codec/serialization/ClassResolvers.java +++ b/codec/src/main/java/io/netty/handler/codec/serialization/ClassResolvers.java @@ -32,7 +32,7 @@ public static ClassResolver cacheDisabled(ClassLoader classLoader) { } /** - * non-agressive non-concurrent cache + * non-aggressive non-concurrent cache * good for non-shared default cache * * @param classLoader - specific classLoader to use, or null if you want to revert to default @@ -45,7 +45,7 @@ public static ClassResolver weakCachingResolver(ClassLoader classLoader) { } /** - * agressive non-concurrent cache + * aggressive non-concurrent cache * good for non-shared cache, when we're not worried about class unloading * * @param classLoader - specific classLoader to use, or null if you want to revert to default @@ -58,7 +58,7 @@ public static ClassResolver softCachingResolver(ClassLoader classLoader) { } /** - * non-agressive concurrent cache + * non-aggressive concurrent cache * good for shared cache, when we're worried about class unloading * * @param classLoader - specific classLoader to use, or null if you want to revert to default @@ -72,7 +72,7 @@ public static ClassResolver weakCachingConcurrentResolver(ClassLoader classLoade } /** - * agressive concurrent cache + * aggressive concurrent cache * good for shared cache, when we're not worried about class unloading * * @param classLoader - specific classLoader to use, or null if you want to revert to default diff --git a/common/src/main/java/io/netty/util/HashingStrategy.java b/common/src/main/java/io/netty/util/HashingStrategy.java index f15f4a3299ba..957d765c4622 100644 --- a/common/src/main/java/io/netty/util/HashingStrategy.java +++ b/common/src/main/java/io/netty/util/HashingStrategy.java @@ -41,7 +41,7 @@ public interface HashingStrategy { * This method has the following restrictions: *