Skip to content

Commit

Permalink
Small fixes and improvements
Browse files Browse the repository at this point in the history
Motivation:

Fix some typos in Netty.

Modifications:

- Fix potentially dangerous use of non-short-circuit logic in Recycler.transfer(Stack<?>).
- Removed double 'the the' in javadoc of EmbeddedChannel.
- Write to log an exception message if we can not get SOMAXCONN in the NetUtil's static block.
  • Loading branch information
idelpivnitskiy authored and Norman Maurer committed Jul 20, 2014
1 parent dc9d933 commit dd429b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/src/main/java/io/netty/util/NetUtil.java
Expand Up @@ -186,7 +186,7 @@ public final class NetUtil {
somaxconn = Integer.parseInt(in.readLine()); somaxconn = Integer.parseInt(in.readLine());
logger.debug("/proc/sys/net/core/somaxconn: {}", somaxconn); logger.debug("/proc/sys/net/core/somaxconn: {}", somaxconn);
} catch (Exception e) { } catch (Exception e) {
// Failed to get SOMAXCONN logger.debug("Failed to get SOMAXCONN", e);
} finally { } finally {
if (in != null) { if (in != null) {
try { try {
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/io/netty/util/Recycler.java
Expand Up @@ -236,7 +236,7 @@ boolean transfer(Stack<?> to) {
} }
to.size = size; to.size = size;


if (end == LINK_CAPACITY & head.next != null) { if (end == LINK_CAPACITY && head.next != null) {
this.head = head.next; this.head = head.next;
} }


Expand Down
Expand Up @@ -163,7 +163,7 @@ public <T> T readOutbound() {
* *
* @param msgs the messages to be written * @param msgs the messages to be written
* *
* @return {@code true} if the write operation did add something to the the inbound buffer * @return {@code true} if the write operation did add something to the inbound buffer
*/ */
public boolean writeInbound(Object... msgs) { public boolean writeInbound(Object... msgs) {
ensureOpen(); ensureOpen();
Expand All @@ -185,7 +185,7 @@ public boolean writeInbound(Object... msgs) {
* Write messages to the outbound of this {@link Channel}. * Write messages to the outbound of this {@link Channel}.
* *
* @param msgs the messages to be written * @param msgs the messages to be written
* @return bufferReadable returns {@code true} if the write operation did add something to the the outbound buffer * @return bufferReadable returns {@code true} if the write operation did add something to the outbound buffer
*/ */
public boolean writeOutbound(Object... msgs) { public boolean writeOutbound(Object... msgs) {
ensureOpen(); ensureOpen();
Expand Down

0 comments on commit dd429b2

Please sign in to comment.