You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2014/02/09 22:25:15 UTC

[06/10] git commit: updated refs/heads/master to 8ed9162

String concatenation cleanup

Replaced string concatenation in loop with StringBuilder

Signed-off-by: Laszlo Hornyak <la...@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 <la...@gmail.com>
Authored: Sun Feb 9 19:01:45 2014 +0100
Committer: Laszlo Hornyak <la...@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());
         }
 
         /*