提交 d85bf665 编写于 作者: V Valentina Armenise

[SECURITY-184] fix test failures checking null value

上级 ef64bb20
......@@ -91,7 +91,7 @@ public class DefaultJnlpSlaveReceiver extends JnlpAgentReceiver {
String handshakeSecret = handshake.getRequestProperty("Secret-Key");
// Verify that the slave secret matches the handshake secret.
if (!computer.getJnlpMac().equals(handshakeSecret)) {
LOGGER.log(Level.WARNING, "An attempt was made to connect as {0} from {1} with an incorrect secret", new Object[]{nodeName, handshake.getSocket().getRemoteSocketAddress()});
LOGGER.log(Level.WARNING, "An attempt was made to connect as {0} from {1} with an incorrect secret", new Object[]{nodeName, handshake.getSocket()!=null?handshake.getSocket().getRemoteSocketAddress():null});
return false;
} else {
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册