From 0dc25905d2eda8f5539960d381e1d9af7bf30982 Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sun, 14 Jun 2015 21:36:11 +0200 Subject: [PATCH] Fix findbugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in NetworkOrchestrator.java If answer is null, method will throw ConnectionException in line 3016 as satisfied by condition stated in line 3014 Signed-off-by: Rohit Yadav This closes #449 --- .../cloudstack/engine/orchestration/NetworkOrchestrator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 6277df1b1ef..d4cdd9de58a 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -3017,7 +3017,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } if (!answer.getResult()) { - s_logger.warn("Unable to setup agent " + hostId + " due to " + ((answer != null) ? answer.getDetails() : "return null")); + s_logger.warn("Unable to setup agent " + hostId + " due to " + answer.getDetails() ); String msg = "Incorrect Network setup on agent, Reinitialize agent after network names are setup, details : " + answer.getDetails(); _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, dcId, host.getPodId(), msg, msg); throw new ConnectionException(true, msg);