Unverified Commit fdaf8492 authored by Felix Bergmann's avatar Felix Bergmann Committed by GitHub

Performance issue when building strings

Improve performance by using StringBuilder instead of StringBuffer.
parent 2433a7e8
......@@ -193,7 +193,7 @@ public class CertificateManager {
char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'};
StringBuffer buf = new StringBuffer(bytes.length * 3);
StringBuilder buf = new StringBuilder(bytes.length * 3);
for (int i = 0; i < bytes.length; ++i) {
buf.append(hexDigits[(bytes[i] & 0xf0) >> 4]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment