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/10/29 09:39:56 UTC
git commit: updated refs/heads/bugfix/CID-1249801 to ab980cd
Repository: cloudstack
Updated Branches:
refs/heads/bugfix/CID-1249801 [created] ab980cd3b
CID-1249801 This should be a string comparison, not an object comparison
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab980cd3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab980cd3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab980cd3
Branch: refs/heads/bugfix/CID-1249801
Commit: ab980cd3b7ae6ada38f7867bdaf3e44b45b6de2f
Parents: bde0c3c
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Oct 29 09:24:19 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Oct 29 09:24:19 2014 +0100
----------------------------------------------------------------------
.../hypervisor/kvm/resource/LibvirtVMDef.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab980cd3/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;