From b2d6d06b48ebe2007a808f46b15b18d6d6da2ad0 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 22 Jun 2016 10:42:31 -0700 Subject: [PATCH] Fixes #661 -JsrExtension is missing hashCode() and equals() --- .../jetty/websocket/jsr356/JsrExtension.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrExtension.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrExtension.java index 39d50200092..885019b1686 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrExtension.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrExtension.java @@ -91,6 +91,23 @@ public class JsrExtension implements Extension return parameters; } + @Override + public boolean equals(Object o) + { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + JsrExtension that = (JsrExtension) o; + + return name != null ? name.equals(that.name) : that.name == null; + } + + @Override + public int hashCode() + { + return name != null ? name.hashCode() : 0; + } + @Override public String toString() {