From 9494818412d3f7d9aa9b8817dd6d62bb64963753 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Mon, 9 Oct 2017 12:49:10 +0200 Subject: Use StringBuilder instead of StringBuffer (#10154) --- server/src/main/java/com/vaadin/server/ComponentSizeValidator.java | 4 ++-- .../src/main/java/com/vaadin/server/communication/ResourceWriter.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server') diff --git a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java index 04dc907799..fdcb578f01 100644 --- a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java +++ b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java @@ -124,7 +124,7 @@ public class ComponentSizeValidator implements Serializable { private static void printServerError(String msg, Deque attributes, boolean widthError, PrintStream errorStream) { - StringBuffer err = new StringBuffer(); + StringBuilder err = new StringBuilder(); err.append("Vaadin DEBUG\n"); StringBuilder indent = new StringBuilder(); @@ -369,7 +369,7 @@ public class ComponentSizeValidator implements Serializable { } private static void showComponent(Component component, String attribute, - StringBuffer err, StringBuilder indent, boolean widthError) { + StringBuilder err, StringBuilder indent, boolean widthError) { FileLocation createLoc = creationLocations.get(component); diff --git a/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java b/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java index 2cfc489c11..286e1475f2 100644 --- a/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java +++ b/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java @@ -79,7 +79,7 @@ public class ResourceWriter implements Serializable { writer.write((resourceIndex++ > 0 ? ", " : "") + "\"" + resource + "\" : "); - final StringBuffer layout = new StringBuffer(); + final StringBuilder layout = new StringBuilder(); try (InputStreamReader r = new InputStreamReader(is, StandardCharsets.UTF_8)) { -- cgit v1.2.3