cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject git commit: updated refs/heads/master to 055f6ad
Date Tue, 18 Nov 2014 08:05:00 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master b008d78b5 -> 055f6ad31


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/055f6ad3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/055f6ad3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/055f6ad3

Branch: refs/heads/master
Commit: 055f6ad318466ed88ed07085f4facc152038b25c
Parents: b008d78
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 13:37:36 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/055f6ad3/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