Fix minor spelling issues in javadocs (#8701)

Motivation:

Javadocs contained some spelling errors, we should fix these.

Modification:

Fix spelling

Result:

Javadoc cleanup.
This commit is contained in:
kashike 2019-01-13 22:24:34 -08:00 committed by Norman Maurer
parent 66addd485f
commit 6fdd7fcddb
17 changed files with 51 additions and 49 deletions

View File

@ -158,8 +158,8 @@ public class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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)}.
* <p>
* {@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 class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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[])}.
* <p>
* {@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 class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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)}.
* <p>
* {@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<ByteBuf> buffers) {
return addComponents(false, buffers);
@ -202,9 +202,9 @@ public class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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)}.
* <p>
* {@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 class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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 class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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 class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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<ByteBuf> buffers) {
addComponents0(increaseWriterIndex, componentCount, buffers);
@ -261,9 +261,9 @@ public class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* Add the given {@link ByteBuf} on the specific index and increase the {@code writerIndex}
* if {@code increaseWriterIndex} is {@code true}.
*
* {@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(boolean increaseWriterIndex, int cIndex, ByteBuf buffer) {
@ -330,13 +330,13 @@ public class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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.
* <p>
* {@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 @@ public class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements
* 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.
* <p>
* {@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<ByteBuf> buffers) {

View File

@ -219,7 +219,7 @@ public final class Unpooled {
* 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 final class Unpooled {
* 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 final class Unpooled {
* 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) {

View File

@ -1695,7 +1695,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
}
/**
* 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);

View File

@ -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();

View File

@ -134,7 +134,7 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter
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();
}

View File

@ -32,7 +32,7 @@ public final class ClassResolvers {
}
/**
* 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 final class ClassResolvers {
}
/**
* 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 final class ClassResolvers {
}
/**
* 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 final class ClassResolvers {
}
/**
* 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

View File

@ -41,7 +41,7 @@ public interface HashingStrategy<T> {
* This method has the following restrictions:
* <ul>
* <li><i>reflexive</i> - {@code equals(a, a)} should return true</li>
* <li><i>symmetric</i> - {@code equals(a, b)} returns {@code true} iff {@code equals(b, a)} returns
* <li><i>symmetric</i> - {@code equals(a, b)} returns {@code true} if {@code equals(b, a)} returns
* {@code true}</li>
* <li><i>transitive</i> - if {@code equals(a, b)} returns {@code true} and {@code equals(a, c)} returns
* {@code true} then {@code equals(b, c)} should also return {@code true}</li>

View File

@ -1199,7 +1199,7 @@ public class ReferenceCountedOpenSslEngine extends SSLEngine implements Referenc
// See https://github.com/netty/netty/issues/3900
if (SSL.bioLengthNonApplication(networkBIO) > 0) {
if (handshakeException == null && handshakeState != HandshakeState.FINISHED) {
// we seems to have data left that needs to be transfered and so the user needs
// we seems to have data left that needs to be transferred and so the user needs
// call wrap(...). Store the error so we can pick it up later.
handshakeException = new SSLHandshakeException(SSL.getErrorString(stackError));
}

View File

@ -404,19 +404,19 @@ public class DnsNameResolverTest {
});
dnsServer2.start();
try {
final Set<String> overridenHostnames = new HashSet<String>();
final Set<String> overriddenHostnames = new HashSet<String>();
for (String name : DOMAINS) {
if (EXCLUSIONS_RESOLVE_A.contains(name)) {
continue;
}
if (PlatformDependent.threadLocalRandom().nextBoolean()) {
overridenHostnames.add(name);
overriddenHostnames.add(name);
}
}
DnsNameResolver resolver = newResolver(false, new DnsServerAddressStreamProvider() {
@Override
public DnsServerAddressStream nameServerAddressStream(String hostname) {
return overridenHostnames.contains(hostname) ? sequential(dnsServer2.localAddress()).stream() :
return overriddenHostnames.contains(hostname) ? sequential(dnsServer2.localAddress()).stream() :
null;
}
}).build();
@ -426,7 +426,7 @@ public class DnsNameResolverTest {
if (resolvedEntry.getValue().isLoopbackAddress()) {
continue;
}
if (overridenHostnames.contains(resolvedEntry.getKey())) {
if (overriddenHostnames.contains(resolvedEntry.getKey())) {
assertEquals("failed to resolve " + resolvedEntry.getKey(),
overriddenIP, resolvedEntry.getValue().getHostAddress());
} else {

View File

@ -67,7 +67,7 @@ public class KQueueChannelConfig extends DefaultChannelConfig {
}
/**
* If this is {@code true} then the {@link RecvByteBufAllocator.Handle#guess()} will be overriden to always attempt
* If this is {@code true} then the {@link RecvByteBufAllocator.Handle#guess()} will be overridden to always attempt
* to read as many bytes as kqueue says are available.
*/
public KQueueChannelConfig setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess) {
@ -76,7 +76,7 @@ public class KQueueChannelConfig extends DefaultChannelConfig {
}
/**
* If this is {@code true} then the {@link RecvByteBufAllocator.Handle#guess()} will be overriden to always attempt
* If this is {@code true} then the {@link RecvByteBufAllocator.Handle#guess()} will be overridden to always attempt
* to read as many bytes as kqueue says are available.
*/
public boolean getRcvAllocTransportProvidesGuess() {

View File

@ -27,7 +27,7 @@ public final class KQueueChannelOption<T> extends UnixChannelOption<T> {
public static final ChannelOption<AcceptFilter> SO_ACCEPTFILTER =
valueOf(KQueueChannelOption.class, "SO_ACCEPTFILTER");
/**
* If this is {@code true} then the {@link RecvByteBufAllocator.Handle#guess()} will be overriden to always attempt
* If this is {@code true} then the {@link RecvByteBufAllocator.Handle#guess()} will be overridden to always attempt
* to read as many bytes as kqueue says are available.
*/
public static final ChannelOption<Boolean> RCV_ALLOC_TRANSPORT_PROVIDES_GUESS =

View File

@ -44,7 +44,7 @@ import static io.netty.channel.kqueue.KQueueStaticallyReferencedJniMethods.noteR
import static io.netty.channel.unix.Errors.newIOException;
/**
* Navite helper methods
* Native helper methods
* <p><strong>Internal usage only!</strong>
*/
final class Native {

View File

@ -15,18 +15,20 @@
*/
package io.netty.channel.unix;
import io.netty.buffer.ByteBuf;
/**
* Different modes of reading from a {@link DomainSocketChannel}.
*/
public enum DomainSocketReadMode {
/**
* Read (@link ByteBuf)s from the {@link DomainSocketChannel}.
* Read {@link ByteBuf}s from the {@link DomainSocketChannel}.
*/
BYTES,
/**
* Read (@link FileDscriptor)s from the {@link DomainSocketChannel}.
* Read {@link FileDescriptor}s from the {@link DomainSocketChannel}.
*/
FILE_DESCRIPTORS
}

View File

@ -40,7 +40,7 @@ public abstract class AbstractCoalescingBufferQueue {
*
* @param channel the {@link Channel} which will have the {@link Channel#isWritable()} reflect the amount of queued
* buffers or {@code null} if there is no writability state updated.
* @param initSize theinitial size of the underlying queue.
* @param initSize the initial size of the underlying queue.
*/
protected AbstractCoalescingBufferQueue(Channel channel, int initSize) {
bufAndListenerPairs = new ArrayDeque<Object>(initSize);

View File

@ -44,7 +44,7 @@ public class DefaultFileRegion extends AbstractReferenceCounted implements FileR
/**
* Create a new instance
*
* @param file the {@link FileChannel} which should be transfered
* @param file the {@link FileChannel} which should be transferred
* @param position the position from which the transfer should start
* @param count the number of bytes to transfer
*/
@ -68,7 +68,7 @@ public class DefaultFileRegion extends AbstractReferenceCounted implements FileR
* Create a new instance using the given {@link File}. The {@link File} will be opened lazily or
* explicitly via {@link #open()}.
*
* @param f the {@link File} which should be transfered
* @param f the {@link File} which should be transferred
* @param position the position from which the transfer should start
* @param count the number of bytes to transfer
*/

View File

@ -58,7 +58,7 @@ public interface FileRegion extends ReferenceCounted {
long position();
/**
* Returns the bytes which was transfered already.
* Returns the bytes which was transferred already.
*
* @deprecated Use {@link #transferred()} instead.
*/
@ -66,7 +66,7 @@ public interface FileRegion extends ReferenceCounted {
long transfered();
/**
* Returns the bytes which was transfered already.
* Returns the bytes which was transferred already.
*/
long transferred();

View File

@ -123,7 +123,7 @@ public class OioDatagramChannel extends AbstractOioMessageChannel
/**
* {@inheritDoc}
*
* This can be safetly cast to {@link OioDatagramChannelConfig}.
* This can be safely cast to {@link OioDatagramChannelConfig}.
*/
@Override
// TODO: Change return type to OioDatagramChannelConfig in next major release