cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ko...@apache.org
Subject [06/10] git commit: updated refs/heads/master to 8ed9162
Date Sun, 09 Feb 2014 21:25:15 GMT
String concatenation cleanup

Replaced string concatenation in loop with StringBuilder

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>


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

Branch: refs/heads/master
Commit: 74a3cb4d5ec2c4919eef531a2b0d5986b975bee3
Parents: 8e3ae40
Author: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Authored: Sun Feb 9 19:01:45 2014 +0100
Committer: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Committed: Sun Feb 9 19:01:45 2014 +0100

----------------------------------------------------------------------
 .../kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/74a3cb4d/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java b/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java
index a948ca1..b380815 100644
--- a/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java
+++ b/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java
@@ -90,11 +90,11 @@ public class QemuImg {
 
         if (options != null && !options.isEmpty()) {
             s.add("-o");
-            String optionsStr = "";
+            final StringBuilder optionsStr = new StringBuilder();
             for (Map.Entry<String, String> option : options.entrySet()) {
-                optionsStr += option.getKey() + "=" + option.getValue() + ",";
+                optionsStr.append(option.getKey()).append('=').append(option.getValue()).append(',');
             }
-            s.add(optionsStr);
+            s.add(optionsStr.toString());
         }
 
         /*


Mime
View raw message