cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [14/22] git commit: updated refs/heads/4.5 to 78b9be0
Date Thu, 05 Feb 2015 11:51:50 GMT
CID-1249801 This should be a string comparison, not an object comparison
(cherry picked from commit ab980cd3b7ae6ada38f7867bdaf3e44b45b6de2f)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: 744c20bd7c5d4440dc74584bd24b31cb0dd9b610
Parents: c25263b
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Oct 29 09:24:19 2014 +0100
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Feb 5 16:02:24 2015 +0530

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtVMDef.java   | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/744c20bd/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
index 2ce2442..b5723ed 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
@@ -218,7 +218,7 @@ public class LibvirtVMDef {
             }
             if (hyperVEnlightenmentFeatureDef != null) {
                 String hpervF = hyperVEnlightenmentFeatureDef.toString();
-                if (hpervF != "") {
+                if (!hpervF.isEmpty()) {
                     feaBuilder.append(hpervF);
                 }
             }
@@ -583,7 +583,7 @@ public class LibvirtVMDef {
         }
 
         public void defNetworkBasedDisk(String diskName, String sourceHost, int sourcePort,
String authUserName, String authSecretUUID, int devId, diskBus bus,
-            diskProtocol protocol, diskFmtType diskFmtType) {
+                diskProtocol protocol, diskFmtType diskFmtType) {
             _diskType = diskType.NETWORK;
             _deviceType = deviceType.DISK;
             _diskFmtType = diskFmtType;
@@ -599,7 +599,7 @@ public class LibvirtVMDef {
         }
 
         public void defNetworkBasedDisk(String diskName, String sourceHost, int sourcePort,
String authUserName, String authSecretUUID, String diskLabel, diskBus bus,
-            diskProtocol protocol, diskFmtType diskFmtType) {
+                diskProtocol protocol, diskFmtType diskFmtType) {
             _diskType = diskType.NETWORK;
             _deviceType = deviceType.DISK;
             _diskFmtType = diskFmtType;
@@ -745,10 +745,10 @@ public class LibvirtVMDef {
             diskBuilder.append("/>\n");
 
             if ((_deviceType != deviceType.CDROM) &&
-                (s_libvirtVersion >= 9008) &&
-                (s_qemuVersion >= 1001000) &&
-                (((_bytesReadRate != null) && (_bytesReadRate > 0)) || ((_bytesWriteRate
!= null) && (_bytesWriteRate > 0)) ||
-                    ((_iopsReadRate != null) && (_iopsReadRate > 0)) || ((_iopsWriteRate
!= null) && (_iopsWriteRate > 0)))) { // not CDROM, from libvirt 0.9.8 and QEMU
1.1.0
+                    (s_libvirtVersion >= 9008) &&
+                    (s_qemuVersion >= 1001000) &&
+                    (((_bytesReadRate != null) && (_bytesReadRate > 0)) || ((_bytesWriteRate
!= null) && (_bytesWriteRate > 0)) ||
+                            ((_iopsReadRate != null) && (_iopsReadRate > 0)) ||
((_iopsWriteRate != null) && (_iopsWriteRate > 0)))) { // not CDROM, from libvirt
0.9.8 and QEMU 1.1.0
                 diskBuilder.append("<iotune>\n");
                 if ((_bytesReadRate != null) && (_bytesReadRate > 0))
                     diskBuilder.append("<read_bytes_sec>" + _bytesReadRate + "</read_bytes_sec>\n");
@@ -800,9 +800,9 @@ public class LibvirtVMDef {
         }
 
         private guestNetType _netType; /*
-                                         * bridge, ethernet, network, user,
-                                         * internal
-                                         */
+         * bridge, ethernet, network, user,
+         * internal
+         */
         private hostNicType _hostNetType; /* Only used by agent java code */
         private String _netSourceMode;
         private String _sourceName;


Mime
View raw message