diff --git a/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java b/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java index 3b103bfbcd..6b0793eb15 100644 --- a/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java +++ b/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java @@ -399,7 +399,7 @@ public final class ChannelBuffers { * Creates a new 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. - * If gathering is true then gathering writes will be used when ever + * If gathering is {@code true} then gathering writes will be used when ever * possible. * * @throws IllegalArgumentException @@ -465,7 +465,7 @@ public final class ChannelBuffers { * Creates a new composite buffer which wraps the slices of the specified * NIO buffers without copying them. A modification on the content of the * specified buffers will be visible to the returned buffer. - * If gathering is true then gathering writes will be used when ever + * If gathering is {@code true} then gathering writes will be used when ever * possible. * * @throws IllegalArgumentException diff --git a/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java b/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java index ab1097449d..98a9b08c3f 100644 --- a/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java +++ b/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java @@ -48,7 +48,7 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer { } /** - * Return true if gathering writes / reads should be used + * Return {@code true} if gathering writes / reads should be used * for this {@link CompositeChannelBuffer} */ public boolean useGathering() { diff --git a/src/main/java/org/jboss/netty/channel/ChannelLocal.java b/src/main/java/org/jboss/netty/channel/ChannelLocal.java index 123469f810..0f9f3cf4f7 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelLocal.java +++ b/src/main/java/org/jboss/netty/channel/ChannelLocal.java @@ -15,13 +15,13 @@ */ package org.jboss.netty.channel; +import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap; + import java.util.Collections; import java.util.Iterator; import java.util.Map.Entry; 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 * variation of {@link ThreadLocal} whose key is a {@link Channel} rather than @@ -49,7 +49,7 @@ public class ChannelLocal implements Iterable> { /** * Creates a {@link Channel} local variable by calling {@link #ChannelLocal(boolean)} with - * false as parameter + * {@code false} as parameter */ public ChannelLocal() { this(false); @@ -58,7 +58,7 @@ public class ChannelLocal implements Iterable> { /** * Creates a {@link Channel} local variable. * - * @param removeOnClose if true 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. */ public ChannelLocal(boolean removeOnClose) { diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/AbstractNioWorker.java b/src/main/java/org/jboss/netty/channel/socket/nio/AbstractNioWorker.java index 68ba0c3ada..0bc99cfb9f 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/AbstractNioWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/AbstractNioWorker.java @@ -384,7 +384,7 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable { * @param task * the {@link Runnable} to execute * @param alwaysAsync - * true 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 */ public void executeInIoThread(Runnable task, boolean alwaysAsync) { diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/AbstractOioWorker.java b/src/main/java/org/jboss/netty/channel/socket/oio/AbstractOioWorker.java index 11e458a227..fa7725ed23 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/AbstractOioWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/AbstractOioWorker.java @@ -145,7 +145,7 @@ abstract class AbstractOioWorker implements Worker * {@link Channels#fireMessageReceived(Channel, Object)} once a message was processed without * errors. * - * @return continue returns true 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 * @throws IOException */ diff --git a/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerHandler.java b/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerHandler.java index b55761718a..4b7698c6f9 100644 --- a/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerHandler.java +++ b/src/main/java/org/jboss/netty/example/http/file/HttpStaticFileServerHandler.java @@ -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 * sample: *
    - *
  1. Request #1 returns the content of /file1.txt.
  2. - *
  3. Contents of /file1.txt is cached by the browser.
  4. - *
  5. Request #2 for /file1.txt does return the contents of the + *
  6. Request #1 returns the content of {@code /file1.txt}.
  7. + *
  8. Contents of {@code /file1.txt} is cached by the browser.
  9. + *
  10. Request #2 for {@code /file1.txt} does return the contents of the * file again. Rather, a 304 Not Modified is returned. This tells the * browser to use the contents stored in its cache.
  11. *
  12. The server knows the file has not been modified because the - * If-Modified-Since date is the same as the file's last + * {@code If-Modified-Since} date is the same as the file's last * modified date.
  13. *
* diff --git a/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/package-info.java b/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/package-info.java index bb450e0482..b7b8c2972f 100644 --- a/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/package-info.java +++ b/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/package-info.java @@ -36,7 +36,7 @@ *

06. Create a directory for test configuration and results: mkdir autobahn cd autobahn. * *

07. Create fuzzing_clinet_spec.json in the above directory - * + * {@code * { * "options": {"failByDrop": false}, * "outdir": "./reports/servers", @@ -51,7 +51,7 @@ * "exclude-cases": [], * "exclude-agent-cases": {} * } - * + * } * *

08. Run the AutobahnServer located in this package. If you are in Eclipse IDE, right click on * AutobahnServer.java and select Run As > Java Application. diff --git a/src/main/java/org/jboss/netty/example/http/websocketx/sslserver/package-info.java b/src/main/java/org/jboss/netty/example/http/websocketx/sslserver/package-info.java index 208ec6e298..67f2f9ecb5 100644 --- a/src/main/java/org/jboss/netty/example/http/websocketx/sslserver/package-info.java +++ b/src/main/java/org/jboss/netty/example/http/websocketx/sslserver/package-info.java @@ -20,11 +20,11 @@ *

*
Step 1. Generate Your Key *
- * keytool -genkey -keystore mySrvKeystore -keyalg RSA. + * {@code keytool -genkey -keystore mySrvKeystore -keyalg RSA}. * Make sure that you set the key password to be the same the key file password. *
Step 2. Specify your key store file and password as system properties *
- * -Dkeystore.file.path=<path to mySrvKeystore> -Dkeystore.file.password=<password> + * {@code -Dkeystore.file.path= -Dkeystore.file.password=} *
Step 3. Run WebSocketSslServer as a Java application *
* Once started, you can test the web server against your browser by navigating to https://localhost:8081/ diff --git a/src/main/java/org/jboss/netty/handler/codec/frame/FixedLengthFrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/frame/FixedLengthFrameDecoder.java index bdf42f4ef8..d3864eebc4 100644 --- a/src/main/java/org/jboss/netty/handler/codec/frame/FixedLengthFrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/frame/FixedLengthFrameDecoder.java @@ -42,7 +42,7 @@ public class FixedLengthFrameDecoder extends FrameDecoder { private final boolean allocateFullBuffer; /** - * Calls {@link #FixedLengthFrameDecoder(int, boolean)} with false + * Calls {@link #FixedLengthFrameDecoder(int, boolean)} with {@code false} */ public FixedLengthFrameDecoder(int frameLength) { this(frameLength, false); @@ -54,7 +54,7 @@ public class FixedLengthFrameDecoder extends FrameDecoder { * @param frameLength * the length of the frame * @param allocateFullBuffer - * true if the cumulative {@link ChannelBuffer} should use the + * {@code true} if the cumulative {@link ChannelBuffer} should use the * {@link #frameLength} as its initial size */ public FixedLengthFrameDecoder(int frameLength, boolean allocateFullBuffer) { diff --git a/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java index dc568b2bb5..5f6929201b 100644 --- a/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java @@ -227,7 +227,7 @@ public abstract class FrameDecoder extends SimpleChannelUpstreamHandler implemen * cost of a higher memory usage if big {@link ChannelBuffer}'s will be * received. * - * By default a threshold of 0 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 * * diff --git a/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java index 442ebd3571..c1ec44382e 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/QueryStringDecoder.java @@ -312,7 +312,7 @@ public class QueryStringDecoder { * {@code 0xC3 0xA9}) is encoded as {@code %C3%A9} or {@code %c3%a9}. *

* This is essentially equivalent to calling - * {@link URLDecoder#decode(String, String) URLDecoder.decode}(s, charset.name()) + * {@link URLDecoder#decode(String, String) URLDecoder.decode(s, charset.name())} * 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 * to decode, the argument itself is returned. diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocket00FrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocket00FrameDecoder.java index 5182a22e9f..efb4c44d39 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocket00FrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocket00FrameDecoder.java @@ -33,7 +33,7 @@ import org.jboss.netty.handler.codec.replay.VoidEnum; */ public class WebSocket00FrameDecoder extends ReplayingDecoder { - private static final int DEFAULT_MAX_FRAME_SIZE = 16384; + private static final long DEFAULT_MAX_FRAME_SIZE = 16384; private final long maxFrameSize; private boolean receivedClosingHandshake; diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java index 24b834847d..239a67e235 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java @@ -200,7 +200,9 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler { } return; - } else if (msg instanceof SpdyRstStreamFrame) { + } + + if (msg instanceof SpdyRstStreamFrame) { SpdyRstStreamFrame spdyRstStreamFrame = (SpdyRstStreamFrame) msg; ChannelBuffer frame = ChannelBuffers.buffer( diff --git a/src/main/java/org/jboss/netty/handler/execution/ChannelEventRunnableFilter.java b/src/main/java/org/jboss/netty/handler/execution/ChannelEventRunnableFilter.java index 6b13693edf..84e7c041f8 100644 --- a/src/main/java/org/jboss/netty/handler/execution/ChannelEventRunnableFilter.java +++ b/src/main/java/org/jboss/netty/handler/execution/ChannelEventRunnableFilter.java @@ -20,7 +20,7 @@ import java.util.concurrent.Executor; public interface ChannelEventRunnableFilter { /** - * Return true 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); diff --git a/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java index bb38b21ef9..39980a2d46 100644 --- a/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java @@ -15,22 +15,6 @@ */ 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.channel.Channel; 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.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 * 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. - * If true 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. * *

- * Be aware that if you call this with false 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 * really have a use-case for it. *

@@ -404,13 +404,13 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor { } /** - * If set to false no queued {@link ChannelEventRunnable}'s {@link ChannelFuture} - * will get notified once {@link #shutdownNow()} is called. If set to true every + * 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} every * queued {@link ChannelEventRunnable} will get marked as failed via {@link ChannelFuture#setFailure(Throwable)}. * *

- * Please only set this to false if you want to handle the notification by yourself - * and know what you are doing. Default is true. + * 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}. *

*/ public void setNotifyChannelFuturesOnShutdown(boolean notifyOnShutdown) { diff --git a/src/main/java/org/jboss/netty/handler/execution/OrderedDownstreamThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/OrderedDownstreamThreadPoolExecutor.java index b91e6f566f..f66c202985 100644 --- a/src/main/java/org/jboss/netty/handler/execution/OrderedDownstreamThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/OrderedDownstreamThreadPoolExecutor.java @@ -15,18 +15,18 @@ */ 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.ChannelEvent; import org.jboss.netty.channel.ChannelFuture; import org.jboss.netty.channel.ChannelFutureListener; 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 * 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 null + * Return {@code null} */ @Override public ObjectSizeEstimator getObjectSizeEstimator() { @@ -92,7 +92,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar } /** - * Returns 0L + * Returns {@code 0L} */ @Override public long getMaxChannelMemorySize() { @@ -109,7 +109,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar } /** - * Returns 0L + * Returns {@code 0L} */ @Override public long getMaxTotalMemorySize() { @@ -126,7 +126,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar } /** - * Return false 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 protected boolean shouldCount(Runnable task) { diff --git a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java index 97536cba6e..38c9d298d0 100644 --- a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java +++ b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java @@ -15,26 +15,6 @@ */ 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.ChannelBuffers; 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.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 SSL * · TLS 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} * (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 - * the connection was established. if {@link #setIssueHandshake(boolean)} is set to true + * 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. *

* @@ -449,7 +448,7 @@ public class SslHandler extends FrameDecoder } /** - * Returns true if the automatic handshake is enabled + * Returns {@code true} if the automatic handshake is enabled */ public boolean isIssueHandshake() { return issueHandshake; @@ -469,12 +468,12 @@ public class SslHandler extends FrameDecoder } /** - * If set to true, 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 * its almost impossible to recover. * - * Anyway the default is false to not break compatibility with older releases. This - * will be changed to true in the next major release. + * Anyway the default is {@code false} to not break compatibility with older releases. This + * will be changed to {@code true} in the next major release. * */ public void setCloseOnSSLException(boolean closeOnSslException) { @@ -663,14 +662,14 @@ public class SslHandler extends FrameDecoder } /** - * Returns true 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}. * * @param buffer * 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}. - * @return encrypted - * true if the {@link ChannelBuffer} is encrypted, false otherwise. + * @return encrypted + * {@code true} if the {@link ChannelBuffer} is encrypted, {@code false} otherwise. * @throws IllegalArgumentException * 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 * 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}. - * @return length + * @return length * The length of the encrypted packet that is included in the buffer. This will - * return -1 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 * Is thrown if the given {@link ChannelBuffer} has not at least 5 bytes to read. */ diff --git a/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java b/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java index 55b1324fc0..363f6941fd 100644 --- a/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java +++ b/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java @@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicInteger; *
* You can disable the use of {@code sun.misc.Unsafe} if you specify * the System property org.jboss.netty.tryUnsafe with - * value of false. Default is true. + * value of {@code false}. Default is {@code true}. */ public final class DetectionUtil { @@ -44,7 +44,7 @@ public final class DetectionUtil { } /** - * Return true if the JVM is running on Windows + * Return {@code true} if the JVM is running on Windows * */ public static boolean isWindows() {