Skip to content
Browse files

ID -> Id (#393 Ensure all fields follow our naming convention)

  • Loading branch information...
1 parent 154198a commit 60de50d89e0ce51a7e3a07422fbac0c153fbf302 @trustin trustin committed Jun 12, 2012
View
18 codec-http/src/main/java/io/netty/handler/codec/spdy/DefaultSpdyPingFrame.java
@@ -22,25 +22,25 @@
*/
public class DefaultSpdyPingFrame implements SpdyPingFrame {
- private int ID;
+ private int id;
/**
* Creates a new instance.
*
- * @param ID the unique ID of this frame
+ * @param id the unique ID of this frame
*/
- public DefaultSpdyPingFrame(int ID) {
- setID(ID);
+ public DefaultSpdyPingFrame(int id) {
+ setId(id);
}
@Override
- public int getID() {
- return ID;
+ public int getId() {
+ return id;
}
@Override
- public void setID(int ID) {
- this.ID = ID;
+ public void setId(int id) {
+ this.id = id;
}
@Override
@@ -49,7 +49,7 @@ public String toString() {
buf.append(getClass().getSimpleName());
buf.append(StringUtil.NEWLINE);
buf.append("--> ID = ");
- buf.append(ID);
+ buf.append(id);
return buf.toString();
}
}
View
2 codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyFrameEncoder.java
@@ -229,7 +229,7 @@ public void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Ex
out.writeShort(version | 0x8000);
out.writeShort(SPDY_PING_FRAME);
out.writeInt(4);
- out.writeInt(spdyPingFrame.getID());
+ out.writeInt(spdyPingFrame.getId());
} else if (msg instanceof SpdyGoAwayFrame) {
View
4 codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyPingFrame.java
@@ -23,10 +23,10 @@
/**
* Returns the ID of this frame.
*/
- int getID();
+ int getId();
/**
* Sets the ID of this frame.
*/
- void setID(int ID);
+ void setId(int id);
}
View
6 codec-http/src/main/java/io/netty/handler/codec/spdy/SpdySessionHandler.java
@@ -347,7 +347,7 @@ private void handleInboundMessage(ChannelHandlerContext ctx, Object msg) throws
SpdyPingFrame spdyPingFrame = (SpdyPingFrame) msg;
- if (isRemoteInitiatedID(spdyPingFrame.getID())) {
+ if (isRemoteInitiatedID(spdyPingFrame.getId())) {
ctx.write(spdyPingFrame);
return;
}
@@ -629,9 +629,9 @@ private void handleOutboundMessage(ChannelHandlerContext ctx, Object msg)
} else if (msg instanceof SpdyPingFrame) {
SpdyPingFrame spdyPingFrame = (SpdyPingFrame) msg;
- if (isRemoteInitiatedID(spdyPingFrame.getID())) {
+ if (isRemoteInitiatedID(spdyPingFrame.getId())) {
ctx.fireExceptionCaught(new IllegalArgumentException(
- "invalid PING ID: " + spdyPingFrame.getID()));
+ "invalid PING ID: " + spdyPingFrame.getId()));
return;
}
pings.getAndIncrement();
View
4 codec-http/src/test/java/io/netty/handler/codec/spdy/SpdySessionHandlerTest.java
@@ -80,7 +80,7 @@ private static void assertPing(Object msg, int ID) {
Assert.assertNotNull(msg);
Assert.assertTrue(msg instanceof SpdyPingFrame);
SpdyPingFrame spdyPingFrame = (SpdyPingFrame) msg;
- Assert.assertTrue(spdyPingFrame.getID() == ID);
+ Assert.assertTrue(spdyPingFrame.getId() == ID);
}
private static void assertGoAway(Object msg, int lastGoodStreamID) {
@@ -226,7 +226,7 @@ private void testSpdySessionHandler(int version, boolean server) {
// Check if session handler returns identical local PINGs
sessionHandler.writeInbound(localPingFrame);
- assertPing(sessionHandler.readOutbound(), localPingFrame.getID());
+ assertPing(sessionHandler.readOutbound(), localPingFrame.getId());
Assert.assertNull(sessionHandler.readOutbound());
// Check if session handler ignores un-initiated remote PINGs

0 comments on commit 60de50d

Please sign in to comment.
Something went wrong with that request. Please try again.