Fixed NPE happening with DEBUG logging.
This commit is contained in:
parent
f2d8157b1e
commit
a5861954b0
|
@ -456,6 +456,8 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
|
|||
public String toConnectionString()
|
||||
{
|
||||
Connection connection = getConnection();
|
||||
if (connection == null)
|
||||
return "null";
|
||||
if (connection instanceof AbstractConnection)
|
||||
return ((AbstractConnection)connection).toConnectionString();
|
||||
return String.format("%s@%x",connection.getClass().getSimpleName(),connection.hashCode());
|
||||
|
|
Loading…
Reference in New Issue