From 2ac1b73b5539b3431896ed6860c2d8dc798a1330 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 2 May 2016 16:18:12 +0200 Subject: [PATCH] Added the connection's hashCode to toString(). This would be useful in dump() where it would be possible to link the EndPoint to the Connection. --- .../main/java/org/eclipse/jetty/io/AbstractEndPoint.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 8b3303579e2..8f08dd8536f 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 @@ -212,7 +212,8 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint name=c.getSimpleName(); } - return String.format("%s@%x{%s<->%d,%s,%s,%s,%s,%s,%d/%d,%s}", + Connection connection = getConnection(); + return String.format("%s@%x{%s<->%d,%s,%s,%s,%s,%s,%d/%d,%s@%x}", name, hashCode(), getRemoteAddress(), @@ -224,6 +225,7 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint _writeFlusher.toStateString(), getIdleFor(), getIdleTimeout(), - getConnection()==null?null:getConnection().getClass().getSimpleName()); + connection == null ? null : connection.getClass().getSimpleName(), + connection == null ? 0 : connection.hashCode()); } }