JRMPListener Java6 compatiblity.

This commit is contained in:
mbechler
2016-03-06 19:32:08 +01:00
parent eabfce0dc2
commit 3273b27c75
@@ -150,7 +150,11 @@ public class JRMPListener implements Runnable {
switch ( protocol ) {
case TransportConstants.StreamProtocol:
out.writeByte(TransportConstants.ProtocolAck);
out.writeUTF(remote.getHostString());
if ( remote.getHostName() != null ) {
out.writeUTF(remote.getHostName());
} else {
out.writeUTF(remote.getAddress().toString());
}
out.writeInt(remote.getPort());
out.flush();
in.readUTF();