Fix visibility warnings from the inspector.

This commit is contained in:
Trustin Lee 2012-11-12 14:03:43 +09:00
parent ec7849ac09
commit 9ac522382a
3 changed files with 19 additions and 20 deletions

View File

@ -110,7 +110,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<Object, HttpMessage
return httpResponse;
} else {
// Response body will follow in a series of Data Frames
messageMap.put(new Integer(streamID), httpResponse);
messageMap.put(Integer.valueOf(streamID), httpResponse);
}
} catch (Exception e) {
SpdyRstStreamFrame spdyRstStreamFrame =
@ -130,7 +130,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<Object, HttpMessage
return httpRequest;
} else {
// Request body will follow in a series of Data Frames
messageMap.put(new Integer(streamID), httpRequest);
messageMap.put(Integer.valueOf(streamID), httpRequest);
}
} catch (Exception e) {
// If a client sends a SYN_STREAM without all of the method, url (host and path),
@ -160,7 +160,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<Object, HttpMessage
return httpResponse;
} else {
// Response body will follow in a series of Data Frames
messageMap.put(new Integer(streamID), httpResponse);
messageMap.put(Integer.valueOf(streamID), httpResponse);
}
} catch (Exception e) {
// If a client receives a SYN_REPLY without valid status and version headers
@ -173,7 +173,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<Object, HttpMessage
} else if (msg instanceof SpdyHeadersFrame) {
SpdyHeadersFrame spdyHeadersFrame = (SpdyHeadersFrame) msg;
Integer streamID = new Integer(spdyHeadersFrame.getStreamId());
Integer streamID = Integer.valueOf(spdyHeadersFrame.getStreamId());
HttpMessage httpMessage = messageMap.get(streamID);
// If message is not in map discard HEADERS frame.
@ -189,7 +189,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<Object, HttpMessage
} else if (msg instanceof SpdyDataFrame) {
SpdyDataFrame spdyDataFrame = (SpdyDataFrame) msg;
Integer streamID = new Integer(spdyDataFrame.getStreamId());
Integer streamID = Integer.valueOf(spdyDataFrame.getStreamId());
HttpMessage httpMessage = messageMap.get(streamID);
// If message is not in map discard Data Frame.
@ -224,7 +224,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<Object, HttpMessage
} else if (msg instanceof SpdyRstStreamFrame) {
SpdyRstStreamFrame spdyRstStreamFrame = (SpdyRstStreamFrame) msg;
Integer streamID = new Integer(spdyRstStreamFrame.getStreamId());
Integer streamID = Integer.valueOf(spdyRstStreamFrame.getStreamId());
messageMap.remove(streamID);
}

View File

@ -38,7 +38,7 @@ final class SpdySession {
}
boolean isActiveStream(int streamID) {
return activeStreams.containsKey(new Integer(streamID));
return activeStreams.containsKey(Integer.valueOf(streamID));
}
// Stream-IDs should be iterated in priority order
@ -53,13 +53,13 @@ final class SpdySession {
int sendWindowSize, int receiveWindowSize) {
if (!remoteSideClosed || !localSideClosed) {
activeStreams.put(
new Integer(streamID),
Integer.valueOf(streamID),
new StreamState(priority, remoteSideClosed, localSideClosed, sendWindowSize, receiveWindowSize));
}
}
boolean removeStream(int streamID) {
Integer StreamID = new Integer(streamID);
Integer StreamID = Integer.valueOf(streamID);
StreamState state = activeStreams.get(StreamID);
activeStreams.remove(StreamID);
if (state != null) {
@ -70,12 +70,12 @@ final class SpdySession {
}
boolean isRemoteSideClosed(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
return state == null || state.isRemoteSideClosed();
}
void closeRemoteSide(int streamID) {
Integer StreamID = new Integer(streamID);
Integer StreamID = Integer.valueOf(streamID);
StreamState state = activeStreams.get(StreamID);
if (state != null) {
state.closeRemoteSide();
@ -86,12 +86,12 @@ final class SpdySession {
}
boolean isLocalSideClosed(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
return state == null || state.isLocalSideClosed();
}
void closeLocalSide(int streamID) {
Integer StreamID = new Integer(streamID);
Integer StreamID = Integer.valueOf(streamID);
StreamState state = activeStreams.get(StreamID);
if (state != null) {
state.closeLocalSide();
@ -106,29 +106,29 @@ final class SpdySession {
* no need to synchronize access to the StreamState
*/
boolean hasReceivedReply(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
return state != null && state.hasReceivedReply();
}
void receivedReply(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
if (state != null) {
state.receivedReply();
}
}
int getSendWindowSize(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
return state != null ? state.getSendWindowSize() : -1;
}
int updateSendWindowSize(int streamID, int deltaWindowSize) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
return state != null ? state.updateSendWindowSize(deltaWindowSize) : -1;
}
int updateReceiveWindowSize(int streamID, int deltaWindowSize) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
if (deltaWindowSize > 0) {
state.setReceiveWindowSizeLowerBound(0);
}
@ -136,7 +136,7 @@ final class SpdySession {
}
int getReceiveWindowSizeLowerBound(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
StreamState state = activeStreams.get(Integer.valueOf(streamID));
return state != null ? state.getReceiveWindowSizeLowerBound() : 0;
}

View File

@ -25,7 +25,6 @@ import org.jboss.marshalling.Marshaller;
import org.jboss.marshalling.MarshallerFactory;
import org.jboss.marshalling.Marshalling;
import org.jboss.marshalling.MarshallingConfiguration;
import org.junit.Assert;
import org.junit.Test;
import java.io.ByteArrayOutputStream;