From 7344c7d87c2361373a7cbac23c5b7736b6bc03fd Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sat, 4 Feb 2012 16:02:44 +0100 Subject: [PATCH] Some small code cleanup --- .../netty/handler/codec/spdy/DefaultSpdyNoOpFrame.java | 4 +--- .../org/jboss/netty/handler/codec/spdy/SpdySession.java | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/DefaultSpdyNoOpFrame.java b/src/main/java/org/jboss/netty/handler/codec/spdy/DefaultSpdyNoOpFrame.java index 03196f7ffd..2ecdb15e4a 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/DefaultSpdyNoOpFrame.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/DefaultSpdyNoOpFrame.java @@ -28,8 +28,6 @@ public class DefaultSpdyNoOpFrame implements SpdyNoOpFrame { @Override public String toString() { - StringBuilder buf = new StringBuilder(); - buf.append(getClass().getSimpleName()); - return buf.toString(); + return getClass().getSimpleName(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySession.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySession.java index 9d28fcbc58..05c77607f1 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySession.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySession.java @@ -43,17 +43,15 @@ final class SpdySession { activeStreams.put(new Integer(streamID), new StreamState(remoteSideClosed, localSideClosed)); } - return; } public void removeStream(int streamID) { activeStreams.remove(new Integer(streamID)); - return; } public boolean isRemoteSideClosed(int streamID) { StreamState state = activeStreams.get(new Integer(streamID)); - return (state == null) || state.isRemoteSideClosed(); + return state == null || state.isRemoteSideClosed(); } public void closeRemoteSide(int streamID) { @@ -69,7 +67,7 @@ final class SpdySession { public boolean isLocalSideClosed(int streamID) { StreamState state = activeStreams.get(new Integer(streamID)); - return (state == null) || state.isLocalSideClosed(); + return state == null || state.isLocalSideClosed(); } public void closeLocalSide(int streamID) { @@ -85,7 +83,7 @@ final class SpdySession { public boolean hasReceivedReply(int streamID) { StreamState state = activeStreams.get(new Integer(streamID)); - return (state != null) && state.hasReceivedReply(); + return state != null && state.hasReceivedReply(); } public void receivedReply(int streamID) {