Skip to content

Commit

Permalink
Fix minor spelling issues in javadocs (netty#8701)
Browse files Browse the repository at this point in the history
Motivation:

Javadocs contained some spelling errors, we should fix these.

Modification:

Fix spelling

Result:

Javadoc cleanup.
  • Loading branch information
kashike authored and normanmaurer committed Jan 14, 2019
1 parent 66addd4 commit 6fdd7fc
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 49 deletions.
42 changes: 21 additions & 21 deletions buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)}.
* <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) {
Expand All @@ -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[])}.
* <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);
Expand All @@ -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)}.
* <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);
Expand All @@ -202,9 +202,9 @@ public CompositeByteBuf addComponents(Iterable<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 #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) {
Expand All @@ -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) {
Expand All @@ -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");
Expand All @@ -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<ByteBuf> buffers) {
addComponents0(increaseWriterIndex, componentCount, buffers);
Expand All @@ -261,9 +261,9 @@ public CompositeByteBuf addComponents(boolean increaseWriterIndex, Iterable<Byte
* 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) {
Expand Down Expand Up @@ -330,13 +330,13 @@ private Component newComponent(ByteBuf buf, int offset) {
* 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");
Expand Down Expand Up @@ -405,11 +405,11 @@ private <T> 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.
* <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) {
Expand Down
6 changes: 3 additions & 3 deletions buffer/src/main/java/io/netty/buffer/Unpooled.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/io/netty/util/HashingStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ private SSLEngineResult sslReadErrorResult(int error, int stackError, int bytesC
// 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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,19 +404,19 @@ public Set<ResourceRecord> getRecords(QuestionRecord question) {
});
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();
Expand All @@ -426,7 +426,7 @@ public DnsServerAddressStream nameServerAddressStream(String hostname) {
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public <T> boolean setOption(ChannelOption<T> option, T value) {
}

/**
* 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) {
Expand All @@ -76,7 +76,7 @@ public KQueueChannelConfig setRcvAllocTransportProvidesGuess(boolean transportPr
}

/**
* 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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import static io.netty.channel.unix.Errors.newIOException;

/**
* Navite helper methods
* Native helper methods
* <p><strong>Internal usage only!</strong>
*/
final class Native {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Loading

0 comments on commit 6fdd7fc

Please sign in to comment.