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

This commit is contained in:
Trustin Lee 2012-11-12 11:51:23 +09:00
parent c1b31f982e
commit d92236a124
18 changed files with 89 additions and 88 deletions

View File

@ -399,7 +399,7 @@ public final class ChannelBuffers {
* Creates a new composite buffer which wraps the readable bytes of the * Creates a new composite buffer which wraps the readable bytes of the
* specified buffers without copying them. A modification on the content * specified buffers without copying them. A modification on the content
* of the specified buffers will be visible to the returned buffer. * of the specified buffers will be visible to the returned buffer.
* If gathering is <code>true</code> then gathering writes will be used when ever * If gathering is {@code true} then gathering writes will be used when ever
* possible. * possible.
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
@ -465,7 +465,7 @@ public final class ChannelBuffers {
* Creates a new composite buffer which wraps the slices of the specified * Creates a new composite buffer which wraps the slices of the specified
* NIO buffers without copying them. A modification on the content of the * NIO buffers without copying them. A modification on the content of the
* specified buffers will be visible to the returned buffer. * specified buffers will be visible to the returned buffer.
* If gathering is <code>true</code> then gathering writes will be used when ever * If gathering is {@code true} then gathering writes will be used when ever
* possible. * possible.
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException

View File

@ -48,7 +48,7 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer {
} }
/** /**
* Return <code>true</code> if gathering writes / reads should be used * Return {@code true} if gathering writes / reads should be used
* for this {@link CompositeChannelBuffer} * for this {@link CompositeChannelBuffer}
*/ */
public boolean useGathering() { public boolean useGathering() {

View File

@ -15,13 +15,13 @@
*/ */
package org.jboss.netty.channel; package org.jboss.netty.channel;
import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap;
/** /**
* A global variable that is local to a {@link Channel}. Think of this as a * A global variable that is local to a {@link Channel}. Think of this as a
* variation of {@link ThreadLocal} whose key is a {@link Channel} rather than * variation of {@link ThreadLocal} whose key is a {@link Channel} rather than
@ -49,7 +49,7 @@ public class ChannelLocal<T> implements Iterable<Entry<Channel, T>> {
/** /**
* Creates a {@link Channel} local variable by calling {@link #ChannelLocal(boolean)} with * Creates a {@link Channel} local variable by calling {@link #ChannelLocal(boolean)} with
* <code>false</code> as parameter * {@code false} as parameter
*/ */
public ChannelLocal() { public ChannelLocal() {
this(false); this(false);
@ -58,7 +58,7 @@ public class ChannelLocal<T> implements Iterable<Entry<Channel, T>> {
/** /**
* Creates a {@link Channel} local variable. * Creates a {@link Channel} local variable.
* *
* @param removeOnClose if <code>true</code> the {@link ChannelLocal} will remove a * @param removeOnClose if {@code true} the {@link ChannelLocal} will remove a
* {@link Channel} from it own once the {@link Channel} was closed. * {@link Channel} from it own once the {@link Channel} was closed.
*/ */
public ChannelLocal(boolean removeOnClose) { public ChannelLocal(boolean removeOnClose) {

View File

@ -384,7 +384,7 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
* @param task * @param task
* the {@link Runnable} to execute * the {@link Runnable} to execute
* @param alwaysAsync * @param alwaysAsync
* <code>true</code> if the {@link Runnable} should be executed * {@code true} if the {@link Runnable} should be executed
* in an async fashion even if the current Thread == IO Thread * in an async fashion even if the current Thread == IO Thread
*/ */
public void executeInIoThread(Runnable task, boolean alwaysAsync) { public void executeInIoThread(Runnable task, boolean alwaysAsync) {

View File

@ -145,7 +145,7 @@ abstract class AbstractOioWorker<C extends AbstractOioChannel> implements Worker
* {@link Channels#fireMessageReceived(Channel, Object)} once a message was processed without * {@link Channels#fireMessageReceived(Channel, Object)} once a message was processed without
* errors. * errors.
* *
* @return continue returns <code>true</code> as long as this worker should continue to try * @return continue returns {@code true} as long as this worker should continue to try
* processing incoming messages * processing incoming messages
* @throws IOException * @throws IOException
*/ */

View File

@ -65,13 +65,13 @@ import static org.jboss.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

@ -42,7 +42,7 @@ public class FixedLengthFrameDecoder extends FrameDecoder {
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);
@ -54,7 +54,7 @@ public class FixedLengthFrameDecoder extends FrameDecoder {
* @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 ChannelBuffer} should use the * {@code true} if the cumulative {@link ChannelBuffer} 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

@ -227,7 +227,7 @@ public abstract class FrameDecoder extends SimpleChannelUpstreamHandler implemen
* cost of a higher memory usage if big {@link ChannelBuffer}'s will be * cost of a higher memory usage if big {@link ChannelBuffer}'s will be
* received. * received.
* *
* By default a threshold of <code>0</code> is used, which means it will * By default a threshold of {@code 0} is used, which means it will
* always copy to try to reduce memory usage * always copy to try to reduce memory usage
* *
* *

View File

@ -312,7 +312,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

@ -33,7 +33,7 @@ import org.jboss.netty.handler.codec.replay.VoidEnum;
*/ */
public class WebSocket00FrameDecoder extends ReplayingDecoder<VoidEnum> { public class WebSocket00FrameDecoder extends ReplayingDecoder<VoidEnum> {
private static final int DEFAULT_MAX_FRAME_SIZE = 16384; private static final long DEFAULT_MAX_FRAME_SIZE = 16384;
private final long maxFrameSize; private final long maxFrameSize;
private boolean receivedClosingHandshake; private boolean receivedClosingHandshake;

View File

@ -200,7 +200,9 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
} }
return; return;
} else if (msg instanceof SpdyRstStreamFrame) { }
if (msg instanceof SpdyRstStreamFrame) {
SpdyRstStreamFrame spdyRstStreamFrame = (SpdyRstStreamFrame) msg; SpdyRstStreamFrame spdyRstStreamFrame = (SpdyRstStreamFrame) msg;
ChannelBuffer frame = ChannelBuffers.buffer( ChannelBuffer frame = ChannelBuffers.buffer(

View File

@ -20,7 +20,7 @@ import java.util.concurrent.Executor;
public interface ChannelEventRunnableFilter { public interface ChannelEventRunnableFilter {
/** /**
* Return <code>true</code> if the {@link ChannelEventRunnable} should get handled by the {@link Executor} * Return {@code true} if the {@link ChannelEventRunnable} should get handled by the {@link Executor}
* *
*/ */
boolean filter(ChannelEventRunnable event); boolean filter(ChannelEventRunnable event);

View File

@ -15,22 +15,6 @@
*/ */
package org.jboss.netty.handler.execution; package org.jboss.netty.handler.execution;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelEvent; import org.jboss.netty.channel.ChannelEvent;
@ -48,6 +32,22 @@ import org.jboss.netty.util.ObjectSizeEstimator;
import org.jboss.netty.util.internal.ConcurrentIdentityHashMap; import org.jboss.netty.util.internal.ConcurrentIdentityHashMap;
import org.jboss.netty.util.internal.SharedResourceMisuseDetector; import org.jboss.netty.util.internal.SharedResourceMisuseDetector;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
/** /**
* A {@link ThreadPoolExecutor} which blocks the task submission when there's * A {@link ThreadPoolExecutor} which blocks the task submission when there's
* too many tasks in the queue. Both per-{@link Channel} and per-{@link Executor} * too many tasks in the queue. Both per-{@link Channel} and per-{@link Executor}
@ -282,11 +282,11 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
/** /**
* See {@link ThreadPoolExecutor#shutdownNow()} for how it handles the shutdown. * See {@link ThreadPoolExecutor#shutdownNow()} for how it handles the shutdown.
* If <code>true</code> is given to this method it also notifies all {@link ChannelFuture}'s * If {@code true} is given to this method it also notifies all {@link ChannelFuture}'s
* of the not executed {@link ChannelEventRunnable}'s. * of the not executed {@link ChannelEventRunnable}'s.
* *
* <p> * <p>
* Be aware that if you call this with <code>false</code> you will need to handle the * Be aware that if you call this with {@code false} you will need to handle the
* notification of the {@link ChannelFuture}'s by your self. So only use this if you * notification of the {@link ChannelFuture}'s by your self. So only use this if you
* really have a use-case for it. * really have a use-case for it.
* </p> * </p>
@ -404,13 +404,13 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
} }
/** /**
* If set to <code>false</code> no queued {@link ChannelEventRunnable}'s {@link ChannelFuture} * If set to {@code false} no queued {@link ChannelEventRunnable}'s {@link ChannelFuture}
* will get notified once {@link #shutdownNow()} is called. If set to <code>true</code> every * will get notified once {@link #shutdownNow()} is called. If set to {@code true} every
* queued {@link ChannelEventRunnable} will get marked as failed via {@link ChannelFuture#setFailure(Throwable)}. * queued {@link ChannelEventRunnable} will get marked as failed via {@link ChannelFuture#setFailure(Throwable)}.
* *
* <p> * <p>
* Please only set this to <code>false</code> if you want to handle the notification by yourself * Please only set this to {@code false} if you want to handle the notification by yourself
* and know what you are doing. Default is <code>true</code>. * and know what you are doing. Default is {@code true}.
* </p> * </p>
*/ */
public void setNotifyChannelFuturesOnShutdown(boolean notifyOnShutdown) { public void setNotifyChannelFuturesOnShutdown(boolean notifyOnShutdown) {

View File

@ -15,18 +15,18 @@
*/ */
package org.jboss.netty.handler.execution; package org.jboss.netty.handler.execution;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelEvent; import org.jboss.netty.channel.ChannelEvent;
import org.jboss.netty.channel.ChannelFuture; import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelFutureListener; import org.jboss.netty.channel.ChannelFutureListener;
import org.jboss.netty.util.ObjectSizeEstimator; import org.jboss.netty.util.ObjectSizeEstimator;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
/** /**
* {@link Executor} which should be used for downstream {@link ChannelEvent}'s. This implementation * {@link Executor} which should be used for downstream {@link ChannelEvent}'s. This implementation
* will take care of preserve the order of the events in a {@link Channel}. If you don't need to * will take care of preserve the order of the events in a {@link Channel}. If you don't need to
@ -75,7 +75,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
/** /**
* Return <code>null</code> * Return {@code null}
*/ */
@Override @Override
public ObjectSizeEstimator getObjectSizeEstimator() { public ObjectSizeEstimator getObjectSizeEstimator() {
@ -92,7 +92,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
} }
/** /**
* Returns <code>0L</code> * Returns {@code 0L}
*/ */
@Override @Override
public long getMaxChannelMemorySize() { public long getMaxChannelMemorySize() {
@ -109,7 +109,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
} }
/** /**
* Returns <code>0L</code> * Returns {@code 0L}
*/ */
@Override @Override
public long getMaxTotalMemorySize() { public long getMaxTotalMemorySize() {
@ -126,7 +126,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
} }
/** /**
* Return <code>false</code> as we not need to cound the memory in this implementation * Return {@code false} as we not need to cound the memory in this implementation
*/ */
@Override @Override
protected boolean shouldCount(Runnable task) { protected boolean shouldCount(Runnable task) {

View File

@ -15,26 +15,6 @@
*/ */
package org.jboss.netty.handler.ssl; package org.jboss.netty.handler.ssl;
import static org.jboss.netty.channel.Channels.*;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.DatagramChannel;
import java.nio.channels.SocketChannel;
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Pattern;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
import javax.net.ssl.SSLEngineResult.Status;
import javax.net.ssl.SSLException;
import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.Channel;
@ -56,6 +36,25 @@ import org.jboss.netty.logging.InternalLoggerFactory;
import org.jboss.netty.util.internal.DetectionUtil; import org.jboss.netty.util.internal.DetectionUtil;
import org.jboss.netty.util.internal.NonReentrantLock; import org.jboss.netty.util.internal.NonReentrantLock;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
import javax.net.ssl.SSLEngineResult.Status;
import javax.net.ssl.SSLException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.DatagramChannel;
import java.nio.channels.SocketChannel;
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Pattern;
import static org.jboss.netty.channel.Channels.*;
/** /**
* Adds <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security">SSL * Adds <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security">SSL
* &middot; TLS</a> and StartTLS support to a {@link Channel}. Please refer * &middot; TLS</a> and StartTLS support to a {@link Channel}. Please refer
@ -75,7 +74,7 @@ import org.jboss.netty.util.internal.NonReentrantLock;
* 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>
* *
@ -449,7 +448,7 @@ public class SslHandler extends FrameDecoder
} }
/** /**
* Returns <code>true</code> if the automatic handshake is enabled * Returns {@code true} if the automatic handshake is enabled
*/ */
public boolean isIssueHandshake() { public boolean isIssueHandshake() {
return issueHandshake; return issueHandshake;
@ -469,12 +468,12 @@ public class SslHandler extends FrameDecoder
} }
/** /**
* If set to <code>true</code>, the {@link Channel} will automatically get closed * If set to {@code true}, the {@link Channel} will automatically get closed
* one a {@link SSLException} was caught. This is most times what you want, as after this * one a {@link SSLException} was caught. This is most times what you want, as after this
* its almost impossible to recover. * its almost impossible to recover.
* *
* Anyway the default is <code>false</code> to not break compatibility with older releases. This * Anyway the default is {@code false} to not break compatibility with older releases. This
* will be changed to <code>true</code> in the next major release. * will be changed to {@code true} in the next major release.
* *
*/ */
public void setCloseOnSSLException(boolean closeOnSslException) { public void setCloseOnSSLException(boolean closeOnSslException) {
@ -663,14 +662,14 @@ public class SslHandler extends FrameDecoder
} }
/** /**
* Returns <code>true</code> if the given {@link ChannelBuffer} is encrypted. Be aware that this method * Returns {@code true} if the given {@link ChannelBuffer} is encrypted. Be aware that this method
* will not increase the readerIndex of the given {@link ChannelBuffer}. * will not increase the readerIndex of the given {@link ChannelBuffer}.
* *
* @param buffer * @param buffer
* The {@link ChannelBuffer} to read from. Be aware that it must have at least 5 bytes to read, * The {@link ChannelBuffer} 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 ChannelBuffer} is encrypted, <code>false</code> otherwise. * {@code true} if the {@link ChannelBuffer} is encrypted, {@code false} otherwise.
* @throws IllegalArgumentException * @throws IllegalArgumentException
* Is thrown if the given {@link ChannelBuffer} has not at least 5 bytes to read. * Is thrown if the given {@link ChannelBuffer} has not at least 5 bytes to read.
*/ */
@ -685,9 +684,9 @@ public class SslHandler extends FrameDecoder
* @param buffer * @param buffer
* The {@link ChannelBuffer} to read from. Be aware that it must have at least 5 bytes to read, * The {@link ChannelBuffer} 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 ChannelBuffer} is not encrypted at all. * return {@code -1} if the given {@link ChannelBuffer} is not encrypted at all.
* @throws IllegalArgumentException * @throws IllegalArgumentException
* Is thrown if the given {@link ChannelBuffer} has not at least 5 bytes to read. * Is thrown if the given {@link ChannelBuffer} has not at least 5 bytes to read.
*/ */

View File

@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* <br> * <br>
* You can disable the use of {@code sun.misc.Unsafe} if you specify * You can disable the use of {@code sun.misc.Unsafe} if you specify
* the System property <strong>org.jboss.netty.tryUnsafe</strong> with * the System property <strong>org.jboss.netty.tryUnsafe</strong> with
* value of <code>false</code>. Default is <code>true</code>. * value of {@code false}. Default is {@code true}.
*/ */
public final class DetectionUtil { public final class DetectionUtil {
@ -44,7 +44,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() {