From e5fb1558a8f69353619b1dfa15612dd5be486bcc Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 1 Dec 2016 13:06:50 -0700 Subject: [PATCH] toConnectionString() can handle null connection --- .../src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java index c34b88b1e9e..324ecfa8d55 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java @@ -456,6 +456,8 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint public String toConnectionString() { Connection connection = getConnection(); + if (connection == null) // can happen during upgrade + return ""; if (connection instanceof AbstractConnection) return ((AbstractConnection)connection).toConnectionString(); return String.format("%s@%x",connection.getClass().getSimpleName(),connection.hashCode());