Allon Mureinik has uploaded a new change for review.

Change subject: core: Append chars instead of Strings in Guid
......................................................................

core: Append chars instead of Strings in Guid

Append '-' instead of "-" as StringBuilder.append(char) has slightly
better performance than StringBuilder.append(String).

Change-Id: Ib9dacce56a06d92307763c7f9ad5f59723e82e04
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/80/16280/1

diff --git 
a/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
 
b/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
index 179b1d6..76da99b 100644
--- 
a/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
+++ 
b/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
@@ -133,16 +133,16 @@
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[1 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[2 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[3 % length]] & 
0xFF));
-        strGUID.append("-");
+        strGUID.append('-');
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[4 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[5 % length]] & 
0xFF));
-        strGUID.append("-");
+        strGUID.append('-');
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[6 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[7 % length]] & 
0xFF));
-        strGUID.append("-");
+        strGUID.append('-');
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[8 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[9 % length]] & 
0xFF));
-        strGUID.append("-");
+        strGUID.append('-');
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[10 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[11 % length]] & 
0xFF));
         strGUID.append(addLeadingZero(inguid[byteOrderIndices[12 % length]] & 
0xFF));
@@ -155,7 +155,7 @@
     }
 
     private static String addLeadingZero(int k) {
-        return (k <= 0xF) ? "0" + Integer.toHexString(k) : Integer
+        return (k <= 0xF) ? '0' + Integer.toHexString(k) : Integer
                 .toHexString(k);
     }
 }


-- 
To view, visit http://gerrit.ovirt.org/16280
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9dacce56a06d92307763c7f9ad5f59723e82e04
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to