perf(common-util): Change StringBuffer to StringBuilder
MODIFY
common/util/src/main/java/io/apiman/common/util/SimpleStringUtils.java
common/util/src/main/java/io/apiman/common/util/SimpleStringUtils.java
@@ -50,7 +50,7 @@ public class SimpleStringUtils {
*/
public static String join(String joinChar, String... args) {
String next = ""; //$NON-NLS-1$
- StringBuffer result = new StringBuffer(length(args) + (args.length - 1));
+ StringBuilder result = new StringBuilder(length(args) + (args.length - 1));
for (String arg : args) {
result.append(next);

MODIFY
gateway/platforms/servlet/src/test/java/io/apiman/gateway/platforms/servlet/auth/tls/CipherAndProtocolSelectionTest.java
gateway/platforms/servlet/src/test/java/io/apiman/gateway/platforms/servlet/auth/tls/CipherAndProtocolSelectionTest.java
@@ -378,7 +378,7 @@ public class CipherAndProtocolSelectionTest {
server.start();
- final StringBuffer sbuff = new StringBuffer();
+ final StringBuilder sbuff = new StringBuilder();
final CountDownLatch latch = new CountDownLatch(1);
HttpConnectorFactory factory = new HttpConnectorFactory(config);

MODIFY
test/common/src/main/java/io/apiman/test/common/mock/EchoServlet.java
test/common/src/main/java/io/apiman/test/common/mock/EchoServlet.java
@@ -108,7 +108,7 @@ public class EchoServlet extends HttpServlet {
};
byte[] hashBytes = sha1.digest();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.length; i++) {
sb.append(Integer.toString((hashBytes[i] & 0xff) + 0x100, 16).substring(1));
}

perf(common-util): Change StringBuffer to StringBuilder