cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject [4/5] git commit: updated refs/heads/4.5 to 9c328cb
Date Tue, 18 Nov 2014 08:52:34 GMT
CLOUDSTACK-7932: Fixed wrong semantics for isVmAlive() method in HypervInvestigator

Findbugs will report error on this as it is expecting true/false for Boolean value.
But we have diffrent meaning for null so it is false positive case from findbug

This closes #39


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4d583a4a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4d583a4a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4d583a4a

Branch: refs/heads/4.5
Commit: 4d583a4a71313d9f62438818c9d657a7c4a5d43d
Parents: 8307dd9
Author: Anshul Gangwar <anshul.gangwar@citrix.com>
Authored: Mon Nov 17 13:00:42 2014 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Tue Nov 18 14:25:23 2014 +0530

----------------------------------------------------------------------
 .../hyperv/src/com/cloud/ha/HypervInvestigator.java | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d583a4a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
index 01d75fa..65498e4 100644
--- a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
+++ b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
@@ -18,6 +18,13 @@
  */
 package com.cloud.ha;
 
+import java.util.List;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+
+import org.apache.log4j.Logger;
+
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.CheckOnHostCommand;
@@ -28,11 +35,6 @@ import com.cloud.host.dao.HostDao;
 import com.cloud.hypervisor.Hypervisor;
 import com.cloud.resource.ResourceManager;
 import com.cloud.utils.component.AdapterBase;
-import org.apache.log4j.Logger;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import java.util.List;
 
 @Local(value=Investigator.class)
 public class HypervInvestigator extends AdapterBase implements Investigator {
@@ -45,9 +47,9 @@ public class HypervInvestigator extends AdapterBase implements Investigator
{
     public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) {
         Status status = isAgentAlive(host);
         if (status == null) {
-            return false;
+            return null;
         }
-        return status == Status.Up ? true : false;
+        return status == Status.Up ? true : null;
     }
 
     @Override


Mime
View raw message