Prefer {@code ...} to <code>...</code> / Fix deprecation warnings

This commit is contained in:
Trustin Lee 2012-11-12 11:51:23 +09:00
parent b195190b2a
commit ea4a0e3535
20 changed files with 61 additions and 57 deletions

View File

@ -22,7 +22,7 @@ public interface ChannelBuf {
ChannelBufType type(); ChannelBufType type();
/** /**
* Return <code>true</code> if the ChannelBuf is pooled. * Return {@code true} if the ChannelBuf is pooled.
* *
*/ */
boolean isPooled(); boolean isPooled();

View File

@ -247,6 +247,9 @@ public class DefaultCompositeByteBuf extends AbstractByteBuf implements Composit
final int capacity = components.get(numComponents - 1).endOffset; final int capacity = components.get(numComponents - 1).endOffset;
ByteBuf consolidated = components.get(numComponents - 1).buf.unsafe().newBuffer(capacity); ByteBuf consolidated = components.get(numComponents - 1).buf.unsafe().newBuffer(capacity);
// We're not using foreach to avoid creating an iterator.
// noinspection ForLoopReplaceableByForEach
for (int i = 0; i < numComponents; i ++) { for (int i = 0; i < numComponents; i ++) {
ByteBuf b = components.get(i).buf; ByteBuf b = components.get(i).buf;
consolidated.writeBytes(b); consolidated.writeBytes(b);

View File

@ -295,7 +295,7 @@ public class QueryStringDecoder {
* {@code 0xC3 0xA9}) is encoded as {@code %C3%A9} or {@code %c3%a9}. * {@code 0xC3 0xA9}) is encoded as {@code %C3%A9} or {@code %c3%a9}.
* <p> * <p>
* This is essentially equivalent to calling * This is essentially equivalent to calling
* <code>{@link URLDecoder#decode(String, String) URLDecoder.decode}(s, charset.name())</code> * {@link URLDecoder#decode(String, String) URLDecoder.decode(s, charset.name())}
* except that it's over 2x faster and generates less garbage for the GC. * except that it's over 2x faster and generates less garbage for the GC.
* Actually this function doesn't allocate any memory if there's nothing * Actually this function doesn't allocate any memory if there's nothing
* to decode, the argument itself is returned. * to decode, the argument itself is returned.

View File

@ -41,7 +41,7 @@ public class FixedLengthFrameDecoder extends ByteToMessageDecoder<Object> {
private final boolean allocateFullBuffer; private final boolean allocateFullBuffer;
/** /**
* Calls {@link #FixedLengthFrameDecoder(int, boolean)} with <code>false</code> * Calls {@link #FixedLengthFrameDecoder(int, boolean)} with {@code false}
*/ */
public FixedLengthFrameDecoder(int frameLength) { public FixedLengthFrameDecoder(int frameLength) {
this(frameLength, false); this(frameLength, false);
@ -53,7 +53,7 @@ public class FixedLengthFrameDecoder extends ByteToMessageDecoder<Object> {
* @param frameLength * @param frameLength
* the length of the frame * the length of the frame
* @param allocateFullBuffer * @param allocateFullBuffer
* <code>true</code> if the cumulative {@link ByteBuf} should use the * {@code true} if the cumulative {@link ByteBuf} should use the
* {@link #frameLength} as its initial size * {@link #frameLength} as its initial size
*/ */
public FixedLengthFrameDecoder(int frameLength, boolean allocateFullBuffer) { public FixedLengthFrameDecoder(int frameLength, boolean allocateFullBuffer) {

View File

@ -85,7 +85,7 @@ public final class DetectionUtil {
} }
/** /**
* Return <code>true</code> if the JVM is running on Windows * Return {@code true} if the JVM is running on Windows
*/ */
public static boolean isWindows() { public static boolean isWindows() {
return IS_WINDOWS; return IS_WINDOWS;

View File

@ -59,13 +59,13 @@ import static io.netty.handler.codec.http.HttpVersion.*;
* Web browser caching works with HTTP headers as illustrated by the following * Web browser caching works with HTTP headers as illustrated by the following
* sample: * sample:
* <ol> * <ol>
* <li>Request #1 returns the content of <code>/file1.txt</code>.</li> * <li>Request #1 returns the content of {@code /file1.txt}.</li>
* <li>Contents of <code>/file1.txt</code> is cached by the browser.</li> * <li>Contents of {@code /file1.txt} is cached by the browser.</li>
* <li>Request #2 for <code>/file1.txt</code> does return the contents of the * <li>Request #2 for {@code /file1.txt} does return the contents of the
* file again. Rather, a 304 Not Modified is returned. This tells the * file again. Rather, a 304 Not Modified is returned. This tells the
* browser to use the contents stored in its cache.</li> * browser to use the contents stored in its cache.</li>
* <li>The server knows the file has not been modified because the * <li>The server knows the file has not been modified because the
* <code>If-Modified-Since</code> date is the same as the file's last * {@code If-Modified-Since} date is the same as the file's last
* modified date.</li> * modified date.</li>
* </ol> * </ol>
* *

View File

@ -36,7 +36,7 @@
* <p>06. Create a directory for test configuration and results: <tt>mkdir autobahn</tt> <tt>cd autobahn</tt>. * <p>06. Create a directory for test configuration and results: <tt>mkdir autobahn</tt> <tt>cd autobahn</tt>.
* *
* <p>07. Create <tt>fuzzing_clinet_spec.json</tt> in the above directory * <p>07. Create <tt>fuzzing_clinet_spec.json</tt> in the above directory
* <code> * {@code
* { * {
* "options": {"failByDrop": false}, * "options": {"failByDrop": false},
* "outdir": "./reports/servers", * "outdir": "./reports/servers",
@ -51,7 +51,7 @@
* "exclude-cases": [], * "exclude-cases": [],
* "exclude-agent-cases": {} * "exclude-agent-cases": {}
* } * }
* </code> * }
* *
* <p>08. Run the <tt>AutobahnServer</tt> located in this package. If you are in Eclipse IDE, right click on * <p>08. Run the <tt>AutobahnServer</tt> located in this package. If you are in Eclipse IDE, right click on
* <tt>AutobahnServer.java</tt> and select Run As > Java Application. * <tt>AutobahnServer.java</tt> and select Run As > Java Application.

View File

@ -20,11 +20,11 @@
* <dl> * <dl>
* <dt>Step 1. Generate Your Key * <dt>Step 1. Generate Your Key
* <dd> * <dd>
* <code>keytool -genkey -keystore mySrvKeystore -keyalg RSA</code>. * {@code keytool -genkey -keystore mySrvKeystore -keyalg RSA}.
* Make sure that you set the key password to be the same the key file password. * Make sure that you set the key password to be the same the key file password.
* <dt>Step 2. Specify your key store file and password as system properties * <dt>Step 2. Specify your key store file and password as system properties
* <dd> * <dd>
* <code>-Dkeystore.file.path=&lt;path to mySrvKeystore&gt; -Dkeystore.file.password=&lt;password&gt;</code> * {@code -Dkeystore.file.path=<path to mySrvKeystore> -Dkeystore.file.password=<password>}
* <dt>Step 3. Run WebSocketSslServer as a Java application * <dt>Step 3. Run WebSocketSslServer as a Java application
* <dd> * <dd>
* Once started, you can test the web server against your browser by navigating to https://localhost:8081/ * Once started, you can test the web server against your browser by navigating to https://localhost:8081/

View File

@ -68,7 +68,7 @@ import javax.net.ssl.SSLException;
* If {@link #isIssueHandshake()} is {@code false} * If {@link #isIssueHandshake()} is {@code false}
* (default) you will need to take care of calling {@link #handshake()} by your own. In most * (default) you will need to take care of calling {@link #handshake()} by your own. In most
* situations were {@link SslHandler} is used in 'client mode' you want to issue a handshake once * situations were {@link SslHandler} is used in 'client mode' you want to issue a handshake once
* the connection was established. if {@link #setIssueHandshake(boolean)} is set to <code>true</code> * the connection was established. if {@link #setIssueHandshake(boolean)} is set to {@code true}
* you don't need to worry about this as the {@link SslHandler} will take care of it. * you don't need to worry about this as the {@link SslHandler} will take care of it.
* <p> * <p>
* *
@ -656,14 +656,14 @@ public class SslHandler
} }
/** /**
* Returns <code>true</code> if the given {@link ByteBuf} is encrypted. Be aware that this method * Returns {@code true} if the given {@link ByteBuf} is encrypted. Be aware that this method
* will not increase the readerIndex of the given {@link ByteBuf}. * will not increase the readerIndex of the given {@link ByteBuf}.
* *
* @param buffer * @param buffer
* The {@link ByteBuf} to read from. Be aware that it must have at least 5 bytes to read, * The {@link ByteBuf} to read from. Be aware that it must have at least 5 bytes to read,
* otherwise it will throw an {@link IllegalArgumentException}. * otherwise it will throw an {@link IllegalArgumentException}.
* @return encrypted * @return encrypted
* <code>true</code> if the {@link ByteBuf} is encrypted, <code>false</code> otherwise. * {@code true} if the {@link ByteBuf} is encrypted, {@code false} otherwise.
* @throws IllegalArgumentException * @throws IllegalArgumentException
* Is thrown if the given {@link ByteBuf} has not at least 5 bytes to read. * Is thrown if the given {@link ByteBuf} has not at least 5 bytes to read.
*/ */
@ -678,9 +678,9 @@ public class SslHandler
* @param buffer * @param buffer
* The {@link ByteBuf} to read from. Be aware that it must have at least 5 bytes to read, * The {@link ByteBuf} to read from. Be aware that it must have at least 5 bytes to read,
* otherwise it will throw an {@link IllegalArgumentException}. * otherwise it will throw an {@link IllegalArgumentException}.
* @return length * @return length
* The length of the encrypted packet that is included in the buffer. This will * The length of the encrypted packet that is included in the buffer. This will
* return <code>-1</code> if the given {@link ByteBuf} is not encrypted at all. * return {@code -1} if the given {@link ByteBuf} is not encrypted at all.
* @throws IllegalArgumentException * @throws IllegalArgumentException
* Is thrown if the given {@link ByteBuf} has not at least 5 bytes to read. * Is thrown if the given {@link ByteBuf} has not at least 5 bytes to read.
*/ */

View File

@ -309,7 +309,7 @@ public class ChunkedWriteHandler
* Read the next {@link ChunkedInput} and transfer it the the outbound buffer. * Read the next {@link ChunkedInput} and transfer it the the outbound buffer.
* @param ctx the {@link ChannelHandlerContext} this handler is bound to * @param ctx the {@link ChannelHandlerContext} this handler is bound to
* @param chunks the {@link ChunkedInput} to read from * @param chunks the {@link ChunkedInput} to read from
* @return read <code>true</code> if something could be transfered to the outbound buffer * @return read {@code true} if something could be transfered to the outbound buffer
* @throws Exception if something goes wrong * @throws Exception if something goes wrong
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -77,7 +77,7 @@ public final class TestUtils {
} }
/** /**
* Return <code>true</code> if SCTP is supported by the running os. * Return {@code true} if SCTP is supported by the running os.
* *
*/ */
public static boolean isSctpSupported() { public static boolean isSctpSupported() {

View File

@ -124,7 +124,7 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<?>> {
/** /**
* Allow to specify a {@link ChannelOption} which is used for the {@link Channel} instances once they got * Allow to specify a {@link ChannelOption} which is used for the {@link Channel} instances once they got
* created. Use a value of <code>null</code> to remove a previous set {@link ChannelOption}. * created. Use a value of {@code null} to remove a previous set {@link ChannelOption}.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <T> B option(ChannelOption<T> option, T value) { public <T> B option(ChannelOption<T> option, T value) {

View File

@ -108,7 +108,7 @@ public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap> {
/** /**
* Allow to specify a {@link ChannelOption} which is used for the {@link Channel} instances once they get created * Allow to specify a {@link ChannelOption} which is used for the {@link Channel} instances once they get created
* (after the acceptor accepted the {@link Channel}). Use a value of <code>null</code> to remove a previous set * (after the acceptor accepted the {@link Channel}). Use a value of {@code null} to remove a previous set
* {@link ChannelOption}. * {@link ChannelOption}.
*/ */
public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value) { public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value) {

View File

@ -205,13 +205,13 @@ public interface Channel extends AttributeMap, ChannelOutboundInvoker, ChannelFu
/** /**
* Return the {@link SocketAddress} to which is bound local or * Return the {@link SocketAddress} to which is bound local or
* <code>null</code> if none. * {@code null} if none.
*/ */
SocketAddress localAddress(); SocketAddress localAddress();
/** /**
* Return the {@link SocketAddress} to which is bound remote or * Return the {@link SocketAddress} to which is bound remote or
* <code>null</code> if none is bound yet. * {@code null} if none is bound yet.
*/ */
SocketAddress remoteAddress(); SocketAddress remoteAddress();
@ -230,7 +230,7 @@ public interface Channel extends AttributeMap, ChannelOutboundInvoker, ChannelFu
/** /**
* Connect the {@link Channel} of the given {@link ChannelFuture} with the given remote {@link SocketAddress}. * Connect the {@link Channel} of the given {@link ChannelFuture} with the given remote {@link SocketAddress}.
* If a specific local {@link SocketAddress} should be used it need to be given as argument. Otherwise just * If a specific local {@link SocketAddress} should be used it need to be given as argument. Otherwise just
* pass <code>null</code> to it. * pass {@code null} to it.
* *
* The {@link ChannelFuture} will get notified once the connect operation was complete. * The {@link ChannelFuture} will get notified once the connect operation was complete.
*/ */

View File

@ -28,14 +28,14 @@ public interface ChannelFutureFactory {
/** /**
* Create a new {@link ChannelFuture} which is marked as successes already. So {@link ChannelFuture#isSuccess()} * Create a new {@link ChannelFuture} which is marked as successes already. So {@link ChannelFuture#isSuccess()}
* will return <code>true</code>. All {@link ChannelFutureListener} added to it will be notified directly. Also * will return {@code true}. All {@link ChannelFutureListener} added to it will be notified directly. Also
* every call of blocking methods will just return without blocking. * every call of blocking methods will just return without blocking.
*/ */
ChannelFuture newSucceededFuture(); ChannelFuture newSucceededFuture();
/** /**
* Create a new {@link ChannelFuture} which is marked as fakued already. So {@link ChannelFuture#isSuccess()} * Create a new {@link ChannelFuture} which is marked as fakued already. So {@link ChannelFuture#isSuccess()}
* will return <code>false</code>. All {@link ChannelFutureListener} added to it will be notified directly. Also * will return {@code false}. All {@link ChannelFutureListener} added to it will be notified directly. Also
* every call of blocking methods will just return without blocking. * every call of blocking methods will just return without blocking.
*/ */
ChannelFuture newFailedFuture(Throwable cause); ChannelFuture newFailedFuture(Throwable cause);

View File

@ -160,114 +160,114 @@ public interface ChannelHandlerContext
Set<ChannelHandlerType> types(); Set<ChannelHandlerType> types();
/** /**
* Return <code>true</code> if the {@link ChannelHandlerContext} has an {@link ByteBuf} bound for inbound * Return {@code true} if the {@link ChannelHandlerContext} has an {@link ByteBuf} bound for inbound
* which can be used. * which can be used.
*/ */
boolean hasInboundByteBuffer(); boolean hasInboundByteBuffer();
/** /**
* Return <code>true</code> if the {@link ChannelHandlerContext} has a {@link MessageBuf} bound for inbound * Return {@code true} if the {@link ChannelHandlerContext} has a {@link MessageBuf} bound for inbound
* which can be used. * which can be used.
*/ */
boolean hasInboundMessageBuffer(); boolean hasInboundMessageBuffer();
/** /**
* Return the bound {@link ByteBuf} for inbound data if {@link #hasInboundByteBuffer()} returned * Return the bound {@link ByteBuf} for inbound data if {@link #hasInboundByteBuffer()} returned
* <code>true</code>. If {@link #hasInboundByteBuffer()} returned <code>false</code> it will throw a * {@code true}. If {@link #hasInboundByteBuffer()} returned {@code false} it will throw a
* {@link UnsupportedOperationException} * {@link UnsupportedOperationException}
*/ */
ByteBuf inboundByteBuffer(); ByteBuf inboundByteBuffer();
/** /**
* Return the bound {@link MessageBuf} for inbound data if {@link #hasInboundMessageBuffer()} returned * Return the bound {@link MessageBuf} for inbound data if {@link #hasInboundMessageBuffer()} returned
* <code>true</code>. If {@link #hasInboundMessageBuffer()} returned <code>false</code> it will throw a * {@code true}. If {@link #hasInboundMessageBuffer()} returned {@code false} it will throw a
* {@link UnsupportedOperationException}. * {@link UnsupportedOperationException}.
*/ */
<T> MessageBuf<T> inboundMessageBuffer(); <T> MessageBuf<T> inboundMessageBuffer();
/** /**
* Return <code>true</code> if the {@link ChannelHandlerContext} has an {@link ByteBuf} bound for outbound * Return {@code true} if the {@link ChannelHandlerContext} has an {@link ByteBuf} bound for outbound
* data which can be used. * data which can be used.
* *
*/ */
boolean hasOutboundByteBuffer(); boolean hasOutboundByteBuffer();
/** /**
* Return <code>true</code> if the {@link ChannelHandlerContext} has a {@link MessageBuf} bound for outbound * Return {@code true} if the {@link ChannelHandlerContext} has a {@link MessageBuf} bound for outbound
* which can be used. * which can be used.
*/ */
boolean hasOutboundMessageBuffer(); boolean hasOutboundMessageBuffer();
/** /**
* Return the bound {@link ByteBuf} for outbound data if {@link #hasOutboundByteBuffer()} returned * Return the bound {@link ByteBuf} for outbound data if {@link #hasOutboundByteBuffer()} returned
* <code>true</code>. If {@link #hasOutboundByteBuffer()} returned <code>false</code> it will throw * {@code true}. If {@link #hasOutboundByteBuffer()} returned {@code false} it will throw
* a {@link UnsupportedOperationException}. * a {@link UnsupportedOperationException}.
*/ */
ByteBuf outboundByteBuffer(); ByteBuf outboundByteBuffer();
/** /**
* Return the bound {@link MessageBuf} for outbound data if {@link #hasOutboundMessageBuffer()} returned * Return the bound {@link MessageBuf} for outbound data if {@link #hasOutboundMessageBuffer()} returned
* <code>true</code>. If {@link #hasOutboundMessageBuffer()} returned <code>false</code> it will throw a * {@code true}. If {@link #hasOutboundMessageBuffer()} returned {@code false} it will throw a
* {@link UnsupportedOperationException} * {@link UnsupportedOperationException}
*/ */
<T> MessageBuf<T> outboundMessageBuffer(); <T> MessageBuf<T> outboundMessageBuffer();
/** /**
* Return <code>true</code> if the next {@link ChannelHandlerContext} has a {@link ByteBuf} for handling * Return {@code true} if the next {@link ChannelHandlerContext} has a {@link ByteBuf} for handling
* inbound data. * inbound data.
*/ */
boolean hasNextInboundByteBuffer(); boolean hasNextInboundByteBuffer();
/** /**
* Return <code>true</code> if the next {@link ChannelHandlerContext} has a {@link MessageBuf} for handling * Return {@code true} if the next {@link ChannelHandlerContext} has a {@link MessageBuf} for handling
* inbound data. * inbound data.
*/ */
boolean hasNextInboundMessageBuffer(); boolean hasNextInboundMessageBuffer();
/** /**
* Return the {@link ByteBuf} of the next {@link ChannelHandlerContext} if {@link #hasNextInboundByteBuffer()} * Return the {@link ByteBuf} of the next {@link ChannelHandlerContext} if {@link #hasNextInboundByteBuffer()}
* returned <code>true</code>, otherwise a {@link UnsupportedOperationException} is thrown. * returned {@code true}, otherwise a {@link UnsupportedOperationException} is thrown.
*/ */
ByteBuf nextInboundByteBuffer(); ByteBuf nextInboundByteBuffer();
/** /**
* Return the {@link MessageBuf} of the next {@link ChannelHandlerContext} if * Return the {@link MessageBuf} of the next {@link ChannelHandlerContext} if
* {@link #hasNextInboundMessageBuffer()} returned <code>true</code>, otherwise a * {@link #hasNextInboundMessageBuffer()} returned {@code true}, otherwise a
* {@link UnsupportedOperationException} is thrown. * {@link UnsupportedOperationException} is thrown.
*/ */
MessageBuf<Object> nextInboundMessageBuffer(); MessageBuf<Object> nextInboundMessageBuffer();
/** /**
* Return <code>true</code> if the next {@link ChannelHandlerContext} has a {@link ByteBuf} for handling outbound * Return {@code true} if the next {@link ChannelHandlerContext} has a {@link ByteBuf} for handling outbound
* data. * data.
*/ */
boolean hasNextOutboundByteBuffer(); boolean hasNextOutboundByteBuffer();
/** /**
* Return <code>true</code> if the next {@link ChannelHandlerContext} has a {@link MessageBuf} for handling * Return {@code true} if the next {@link ChannelHandlerContext} has a {@link MessageBuf} for handling
* outbound data. * outbound data.
*/ */
boolean hasNextOutboundMessageBuffer(); boolean hasNextOutboundMessageBuffer();
/** /**
* Return the {@link ByteBuf} of the next {@link ChannelHandlerContext} if {@link #hasNextOutboundByteBuffer()} * Return the {@link ByteBuf} of the next {@link ChannelHandlerContext} if {@link #hasNextOutboundByteBuffer()}
* returned <code>true</code>, otherwise a {@link UnsupportedOperationException} is thrown. * returned {@code true}, otherwise a {@link UnsupportedOperationException} is thrown.
*/ */
ByteBuf nextOutboundByteBuffer(); ByteBuf nextOutboundByteBuffer();
/** /**
* Return the {@link MessageBuf} of the next {@link ChannelHandlerContext} if * Return the {@link MessageBuf} of the next {@link ChannelHandlerContext} if
* {@link #hasNextOutboundMessageBuffer()} returned <code>true</code>, otherwise a * {@link #hasNextOutboundMessageBuffer()} returned {@code true}, otherwise a
* {@link UnsupportedOperationException} is thrown. * {@link UnsupportedOperationException} is thrown.
*/ */
MessageBuf<Object> nextOutboundMessageBuffer(); MessageBuf<Object> nextOutboundMessageBuffer();
/** /**
* Return <code>true</code> if the {@link ChannelHandlerContext} was marked as readable. This basically means * Return {@code true} if the {@link ChannelHandlerContext} was marked as readable. This basically means
* that once its not readable anymore no new data will be read from the transport and passed down the * that once its not readable anymore no new data will be read from the transport and passed down the
* {@link ChannelPipeline}. * {@link ChannelPipeline}.
* *
* Only if all {@link ChannelHandlerContext}'s {@link #isReadable()} return <code>true</code>, the data is * Only if all {@link ChannelHandlerContext}'s {@link #isReadable()} return {@code true}, the data is
* passed again down the {@link ChannelPipeline}. * passed again down the {@link ChannelPipeline}.
*/ */
boolean isReadable(); boolean isReadable();

View File

@ -88,10 +88,10 @@ public abstract class ChannelInboundMessageHandlerAdapter<I>
/** /**
* Will get notified once {@link #inboundBufferUpdated(ChannelHandlerContext)} was called. * Will get notified once {@link #inboundBufferUpdated(ChannelHandlerContext)} was called.
* *
* If this method returns <code>false</code> no further processing of the {@link MessageBuf} * If this method returns {@code false} no further processing of the {@link MessageBuf}
* will be done until the next call of {@link #inboundBufferUpdated(ChannelHandlerContext)}. * will be done until the next call of {@link #inboundBufferUpdated(ChannelHandlerContext)}.
* *
* This will return <code>true</code> by default, and may get overriden by sub-classes for * This will return {@code true} by default, and may get overriden by sub-classes for
* special handling. * special handling.
*/ */
public boolean beginMessageReceived(ChannelHandlerContext ctx) throws Exception { public boolean beginMessageReceived(ChannelHandlerContext ctx) throws Exception {

View File

@ -34,7 +34,7 @@ public interface EventExecutor extends EventExecutorGroup, ScheduledExecutorServ
/** /**
* Return the {@link EventExecutorGroup} which is the parent of this {@link EventExecutor}, * Return the {@link EventExecutorGroup} which is the parent of this {@link EventExecutor},
* or <code>null</code> if it has no parent * or {@code null} if it has no parent
*/ */
EventExecutorGroup parent(); EventExecutorGroup parent();
@ -45,8 +45,8 @@ public interface EventExecutor extends EventExecutorGroup, ScheduledExecutorServ
boolean inEventLoop(); boolean inEventLoop();
/** /**
* Return <code>true</code> if the given {@link Thread} is executed in the event loop, * Return {@code true} if the given {@link Thread} is executed in the event loop,
* <code>false</code> otherwise. * {@code false} otherwise.
*/ */
boolean inEventLoop(Thread thread); boolean inEventLoop(Thread thread);
} }

View File

@ -36,7 +36,7 @@ public final class SctpNotificationEvent {
/** /**
* Return the attachment of this {@link SctpNotificationEvent}, or * Return the attachment of this {@link SctpNotificationEvent}, or
* <code>null</code> if no attachment was provided * {@code null} if no attachment was provided
*/ */
public Object attachment() { public Object attachment() {
return attachment; return attachment;

View File

@ -15,7 +15,6 @@
*/ */
package io.netty.channel.socket.aio; package io.netty.channel.socket.aio;
import static io.netty.channel.ChannelOption.*;
import io.netty.channel.ChannelException; import io.netty.channel.ChannelException;
import io.netty.channel.ChannelOption; import io.netty.channel.ChannelOption;
import io.netty.channel.DefaultChannelConfig; import io.netty.channel.DefaultChannelConfig;
@ -27,6 +26,8 @@ import java.nio.channels.InterruptedByTimeoutException;
import java.nio.channels.NetworkChannel; import java.nio.channels.NetworkChannel;
import java.util.Map; import java.util.Map;
import static io.netty.channel.ChannelOption.*;
/** /**
* The default {@link SocketChannelConfig} implementation. * The default {@link SocketChannelConfig} implementation.
*/ */
@ -262,7 +263,7 @@ final class AioSocketChannelConfig extends DefaultChannelConfig
* Once such an exception was detected it will get propagated to the handlers first. After that the channel * Once such an exception was detected it will get propagated to the handlers first. After that the channel
* will get closed as it may be in an unknown state. * will get closed as it may be in an unknown state.
* *
* To disable it just use <code>0</code>. * To disable it just use {@code 0}.
*/ */
public void setReadTimeout(long readTimeoutInMillis) { public void setReadTimeout(long readTimeoutInMillis) {
if (readTimeoutInMillis < 0) { if (readTimeoutInMillis < 0) {
@ -276,7 +277,7 @@ final class AioSocketChannelConfig extends DefaultChannelConfig
* Once such an exception was detected it will get propagated to the handlers first. After that the channel * Once such an exception was detected it will get propagated to the handlers first. After that the channel
* will get closed as it may be in an unknown state. * will get closed as it may be in an unknown state.
* *
* To disable it just use <code>0</code>. * To disable it just use {@code 0}.
*/ */
public void setWriteTimeout(long writeTimeoutInMillis) { public void setWriteTimeout(long writeTimeoutInMillis) {
if (writeTimeoutInMillis < 0) { if (writeTimeoutInMillis < 0) {
@ -288,7 +289,7 @@ final class AioSocketChannelConfig extends DefaultChannelConfig
/** /**
* Return the read timeout in milliseconds after which a {@link InterruptedByTimeoutException} will get thrown. * Return the read timeout in milliseconds after which a {@link InterruptedByTimeoutException} will get thrown.
* *
* The default is <code>0</code> * The default is {@code 0}
*/ */
public long getReadTimeout() { public long getReadTimeout() {
return readTimeoutInMillis; return readTimeoutInMillis;
@ -297,7 +298,7 @@ final class AioSocketChannelConfig extends DefaultChannelConfig
/** /**
* Return the write timeout in milliseconds after which a {@link InterruptedByTimeoutException} will get thrown. * Return the write timeout in milliseconds after which a {@link InterruptedByTimeoutException} will get thrown.
* *
* The default is <code>0</code> * The default is {@code 0}
*/ */
public long getWriteTimeout() { public long getWriteTimeout() {
return writeTimeoutInMillis; return writeTimeoutInMillis;