From d5151ddc90b7fad14261d669d2a61f1e759e9b1a Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 7 Apr 2017 13:20:50 -0700 Subject: [PATCH] Issue #207 - remove IncomingFrames#incomingError(throwable) --- .../websocket/api/extensions/IncomingFrames.java | 3 --- .../common/extensions/AbstractExtension.java | 11 ----------- .../websocket/common/extensions/ExtensionStack.java | 6 ------ .../common/extensions/identity/IdentityExtension.java | 7 ------- .../common/io/AbstractWebSocketConnection.java | 2 +- .../common/extensions/DummyIncomingFrames.java | 6 ------ .../compress/DeflateFrameExtensionTest.java | 5 ----- .../jetty/websocket/common/test/BlockheadClient.java | 9 --------- .../common/test/BlockheadServerConnection.java | 6 ------ .../websocket/common/test/IncomingFramesCapture.java | 6 ------ 10 files changed, 1 insertion(+), 60 deletions(-) diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/IncomingFrames.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/IncomingFrames.java index 31b1144d432..a8ce0c2e575 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/IncomingFrames.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/IncomingFrames.java @@ -25,9 +25,6 @@ import org.eclipse.jetty.websocket.api.FrameCallback; */ public interface IncomingFrames { - @Deprecated - void incomingError(Throwable t); - /** * Process the incoming frame. *

diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/AbstractExtension.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/AbstractExtension.java index 598d6eeb1a9..f02dbf7f43b 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/AbstractExtension.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/AbstractExtension.java @@ -126,12 +126,6 @@ public abstract class AbstractExtension extends AbstractLifeCycle implements Dum return policy; } - @Override - public void incomingError(Throwable e) - { - nextIncomingError(e); - } - /** * Used to indicate that the extension makes use of the RSV1 bit of the base websocket framing. *

@@ -171,11 +165,6 @@ public abstract class AbstractExtension extends AbstractLifeCycle implements Dum return false; } - protected void nextIncomingError(Throwable e) - { - this.nextIncoming.incomingError(e); - } - protected void nextIncomingFrame(Frame frame, FrameCallback callback) { log.debug("nextIncomingFrame({})",frame); diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/ExtensionStack.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/ExtensionStack.java index 12b6b1e683c..cb4c4a5abfe 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/ExtensionStack.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/ExtensionStack.java @@ -208,12 +208,6 @@ public class ExtensionStack extends ContainerLifeCycle implements IncomingFrames return (this.extensions != null) && (this.extensions.size() > 0); } - @Override - public void incomingError(Throwable e) - { - nextIncoming.incomingError(e); - } - @Override public void incomingFrame(Frame frame, FrameCallback callback) { diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/identity/IdentityExtension.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/identity/IdentityExtension.java index 4d222bb036e..f9a74e7140f 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/identity/IdentityExtension.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/identity/IdentityExtension.java @@ -42,13 +42,6 @@ public class IdentityExtension extends AbstractExtension return "identity"; } - @Override - public void incomingError(Throwable e) - { - // pass through - nextIncomingError(e); - } - @Override public void incomingFrame(Frame frame, FrameCallback callback) { diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java index 38f01fa8314..7e550af7f48 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java @@ -574,7 +574,7 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp private void notifyError(Throwable cause) { - extensionStack.incomingError(cause); + // FIXME need to forward error to Session (or those interested) } @Override diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/DummyIncomingFrames.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/DummyIncomingFrames.java index d1d4590bce7..a4063f22b2a 100644 --- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/DummyIncomingFrames.java +++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/DummyIncomingFrames.java @@ -37,12 +37,6 @@ public class DummyIncomingFrames implements IncomingFrames this.id = id; } - @Override - public void incomingError(Throwable e) - { - LOG.debug("incomingError()",e); - } - @Override public void incomingFrame(Frame frame, FrameCallback callback) { diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java index 2e909ab7f63..79194036856 100644 --- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java +++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java @@ -434,11 +434,6 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest throw new RuntimeIOException(x); } } - - @Override - public void incomingError(Throwable t) - { - } }); BinaryFrame frame = new BinaryFrame(); diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadClient.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadClient.java index 8af926d808a..75566ea0bd4 100644 --- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadClient.java +++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadClient.java @@ -97,7 +97,6 @@ public class BlockheadClient implements OutgoingFrames, ConnectionStateListener, public long totalParseOps = 0; public EventQueue frames = new EventQueue<>(); - public EventQueue errors = new EventQueue<>(); @Override public void run() @@ -152,7 +151,6 @@ public class BlockheadClient implements OutgoingFrames, ConnectionStateListener, StringBuilder str = new StringBuilder(); str.append("FrameReadingThread["); str.append(",frames=" + frames.size()); - str.append(",errors=" + errors.size()); str.append(String.format(",totalBytes=%,d",totalBytes)); str.append(String.format(",totalReadOps=%,d",totalReadOps)); str.append(String.format(",totalParseOps=%,d",totalParseOps)); @@ -160,12 +158,6 @@ public class BlockheadClient implements OutgoingFrames, ConnectionStateListener, return str.toString(); } - @Override - public synchronized void incomingError(Throwable t) - { - this.errors.add(t); - } - @Override public synchronized void incomingFrame(Frame frame, FrameCallback callback) { @@ -175,7 +167,6 @@ public class BlockheadClient implements OutgoingFrames, ConnectionStateListener, public synchronized void clear() { this.frames.clear(); - this.errors.clear(); } } diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadServerConnection.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadServerConnection.java index 0d1b596ec2e..de7ea9c4c99 100644 --- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadServerConnection.java +++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/BlockheadServerConnection.java @@ -214,12 +214,6 @@ public class BlockheadServerConnection implements IncomingFrames, OutgoingFrames return policy; } - @Override - public void incomingError(Throwable e) - { - incomingFrames.incomingError(e); - } - @Override public void incomingFrame(Frame frame, FrameCallback callback) { diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/IncomingFramesCapture.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/IncomingFramesCapture.java index a4f882ea82d..8b91ee8a5ee 100644 --- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/IncomingFramesCapture.java +++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/IncomingFramesCapture.java @@ -145,12 +145,6 @@ public class IncomingFramesCapture implements Parser.Handler, IncomingFrames return frames; } - @Override - public void incomingError(Throwable t) - { - errors.add(t); - } - @Override public void incomingFrame(Frame frame, FrameCallback callback) {