From 5d796488e254b2577d57c00e9f9f6428f06daa1f Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 10 Jul 2012 14:07:04 -0700 Subject: [PATCH] Fixing logging format specifier bug --- .../jetty/websocket/io/WebSocketAsyncConnection.java | 2 +- .../org/eclipse/jetty/websocket/parser/Parser.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java index 26f49d3a307..3a448d08d9f 100644 --- a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java +++ b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/io/WebSocketAsyncConnection.java @@ -225,7 +225,7 @@ public class WebSocketAsyncConnection extends AbstractAsyncConnection implements finally { // TODO: does fillInterested need to be called again? - fillInterested(); + // fillInterested(); setCurrentConnection(null); bufferPool.release(buffer); } diff --git a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/parser/Parser.java b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/parser/Parser.java index 0db2fa1a2fc..604642b8efc 100644 --- a/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/parser/Parser.java +++ b/jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/parser/Parser.java @@ -434,6 +434,16 @@ public class Parser @Override public String toString() { - return String.format("%s(parser=%s)",getClass().getSimpleName()); + StringBuilder builder = new StringBuilder(); + builder.append("Parser [state="); + builder.append(state); + builder.append(", cursor="); + builder.append(cursor); + builder.append(", payloadLength="); + builder.append(payloadLength); + builder.append(", frame="); + builder.append(frame); + builder.append("]"); + return builder.toString(); } }