cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 52c4f00
Date Mon, 24 Feb 2014 13:45:35 GMT
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 <htrippaers@schubergphilis.com>
Authored: Mon Feb 24 14:06:40 2014 +0100
Committer: Hugo Trippaers <htrippaers@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);
 


Mime
View raw message