mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 04:19:12 +00:00
toConnectionString() can handle null connection
This commit is contained in:
parent
709938e02b
commit
e5fb1558a8
@ -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 "<null>";
|
||||
if (connection instanceof AbstractConnection)
|
||||
return ((AbstractConnection)connection).toConnectionString();
|
||||
return String.format("%s@%x",connection.getClass().getSimpleName(),connection.hashCode());
|
||||
|
Loading…
x
Reference in New Issue
Block a user