Fixed toConnectionString() to avoid NPE.

This commit is contained in:
Simone Bordet 2017-04-03 19:33:48 +02:00
parent d841dba997
commit 7547fc4b29
1 changed files with 2 additions and 1 deletions

View File

@ -307,12 +307,13 @@ public class SslConnection extends AbstractConnection
b = _decryptedInput;
int di=b==null?-1:b.remaining();
Connection connection = _decryptedEndPoint.getConnection();
return String.format("%s@%x{%s,eio=%d/%d,di=%d}=>%s",
getClass().getSimpleName(),
hashCode(),
_sslEngine.getHandshakeStatus(),
ei,eo,di,
((AbstractConnection)_decryptedEndPoint.getConnection()).toConnectionString());
connection instanceof AbstractConnection ? ((AbstractConnection)connection).toConnectionString() : connection);
}
public class DecryptedEndPoint extends AbstractEndPoint