Skip to content

Commit 426fb95

Browse files
committed
Change stringbuffer to stringbuilder
1 parent 49f680d commit 426fb95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/httpserver/Hasher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public String getHash(byte[] input) {
2020
}
2121

2222
private String bytesToHex(byte[] hash) {
23-
StringBuffer stringBuffer = new StringBuffer();
23+
StringBuilder stringBuilder = new StringBuilder();
2424
for (byte b : hash) {
25-
stringBuffer.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1));
25+
stringBuilder.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1));
2626
}
27-
return stringBuffer.toString();
27+
return stringBuilder.toString();
2828
}
2929
}

0 commit comments

Comments
 (0)