You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/02/24 14:45:35 UTC

[1/2] git commit: updated refs/heads/master to 52c4f00

Repository: cloudstack
Updated Branches:
  refs/heads/master f960ada36 -> 52c4f00b2


Fix CID 1186644: ES: Checking String equality using == or !=

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

Branch: refs/heads/master
Commit: 6b61fd7d099bdb945a7d9f784060f8ab2585610c
Parents: f960ada
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Mon Feb 24 14:06:40 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Mon Feb 24 14:06:40 2014 +0100

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b61fd7d/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java
index 3f7909e..6199e5d 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java
@@ -64,11 +64,11 @@ public class LibvirtStoragePoolXMLParser {
                     String authUsername = auth.getAttribute("username");
                     String authType = auth.getAttribute("type");
                     return new LibvirtStoragePoolDef(LibvirtStoragePoolDef.poolType.valueOf(type.toUpperCase()), poolName, uuid, host, port, pool, authUsername,
-                        LibvirtStoragePoolDef.authType.valueOf(authType.toUpperCase()), uuid);
+                            LibvirtStoragePoolDef.authType.valueOf(authType.toUpperCase()), uuid);
                 } else {
                     return new LibvirtStoragePoolDef(LibvirtStoragePoolDef.poolType.valueOf(type.toUpperCase()), poolName, uuid, host, port, pool, "");
                 }
-            /* Gluster is a sub-type of LibvirtStoragePoolDef.poolType.NETFS, need to check format */
+                /* Gluster is a sub-type of LibvirtStoragePoolDef.poolType.NETFS, need to check format */
             } else if (format != null && format.equalsIgnoreCase("glusterfs")) {
                 /* libvirt does not return the default port, but requires it for a disk-definition */
                 int port = 24007;
@@ -80,11 +80,11 @@ public class LibvirtStoragePoolXMLParser {
                 String targetPath = getTagValue("path", target);
 
                 String portValue = getAttrValue("host", "port", source);
-                if (portValue != "")
+                if (portValue != null && !portValue.isEmpty())
                     port = Integer.parseInt(portValue);
 
                 return new LibvirtStoragePoolDef(LibvirtStoragePoolDef.poolType.valueOf(format.toUpperCase()),
-                    poolName, uuid, host, port, path, targetPath);
+                        poolName, uuid, host, port, path, targetPath);
             } else {
                 String path = getAttrValue("dir", "path", source);
 


[2/2] git commit: updated refs/heads/master to 52c4f00

Posted by hu...@apache.org.
Findbugs: Fix potential NPE

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

Branch: refs/heads/master
Commit: 52c4f00b266eb4e7264ea715ed0cb4d62def5667
Parents: 6b61fd7
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Mon Feb 24 14:07:33 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Mon Feb 24 14:07:33 2014 +0100

----------------------------------------------------------------------
 .../com/cloud/hypervisor/kvm/resource/KVMHABase.java   | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52c4f00b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java
index fdaaeb3..b829f78 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java
@@ -48,11 +48,11 @@ public class KVMHABase {
         PoolType _type;
 
         public NfsStoragePool(String poolUUID, String poolIp, String poolSourcePath, String mountDestPath, PoolType type) {
-            this._poolUUID = poolUUID;
-            this._poolIp = poolIp;
-            this._poolMountSourcePath = poolSourcePath;
-            this._mountDestPath = mountDestPath;
-            this._type = type;
+            _poolUUID = poolUUID;
+            _poolIp = poolIp;
+            _poolMountSourcePath = poolSourcePath;
+            _mountDestPath = mountDestPath;
+            _type = type;
         }
     }
 
@@ -115,8 +115,9 @@ public class KVMHABase {
                      * the storage pool still running
                      */
                 }
+                poolName = pool.getName();
             }
-            poolName = pool.getName();
+
         } catch (LibvirtException e) {
             s_logger.debug("Ignoring libvirt error.", e);
         } finally {