diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-09 12:49:10 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-10-09 13:49:10 +0300 |
commit | 9494818412d3f7d9aa9b8817dd6d62bb64963753 (patch) | |
tree | 7d53ae6fb3d1da2da5a47da8460a52980aaea2f4 /uitest | |
parent | 915463b21a339b6bbc741ac1ce325ba209d821c9 (diff) | |
download | vaadin-framework-9494818412d3f7d9aa9b8817dd6d62bb64963753.tar.gz vaadin-framework-9494818412d3f7d9aa9b8817dd6d62bb64963753.zip |
Use StringBuilder instead of StringBuffer (#10154)
Diffstat (limited to 'uitest')
7 files changed, 9 insertions, 9 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java b/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java index 0f4c0440ea..f5a8f1a72f 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java +++ b/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java @@ -100,7 +100,7 @@ public class TestForContainerFilterable extends CustomComponent { private String randomWord() { int len = (int) (Math.random() * 4); - final StringBuffer buf = new StringBuffer(); + final StringBuilder buf = new StringBuilder(); while (len-- >= 0) { buf.append(parts[(int) (Math.random() * parts.length)]); } diff --git a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java index 9da1e2250e..6894eec2e3 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java +++ b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java @@ -156,7 +156,7 @@ public class TestForStyledUpload extends LegacyApplication } public void readState() { - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); if (up.isUploading()) { sb.append("Uploading..."); @@ -293,7 +293,7 @@ public class TestForStyledUpload extends LegacyApplication private void refreshMemUsage() { // memoryStatus.setValue("Not available in Java 1.4"); - StringBuffer mem = new StringBuffer(); + StringBuilder mem = new StringBuilder(); MemoryMXBean mmBean = ManagementFactory.getMemoryMXBean(); mem.append("Heap (M):"); mem.append(mmBean.getHeapMemoryUsage().getUsed() / 1048576); diff --git a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java index 22ece0d45a..31dff4e350 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java +++ b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java @@ -273,7 +273,7 @@ public class TestForUpload extends CustomComponent } public void readState() { - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); if (up.isUploading()) { sb.append("Uploading..."); @@ -442,7 +442,7 @@ public class TestForUpload extends CustomComponent private void refreshMemUsage() { memoryStatus.setValue("Not available in Java 1.4"); - StringBuffer mem = new StringBuffer(); + StringBuilder mem = new StringBuilder(); MemoryMXBean mmBean = ManagementFactory.getMemoryMXBean(); mem.append("Heap (M):"); mem.append(mmBean.getHeapMemoryUsage().getUsed() / 1048576); diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java index 95602fb78b..31ecf12927 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java +++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java @@ -235,7 +235,7 @@ public class TestSizeableIncomponents extends LegacyApplication { } public String getTestableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(classToTest.getName().replaceAll("com.vaadin.ui.", "")); sb.append('['); for (Iterator<Configuration> i = configurations.iterator(); i diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java index af091b9036..e51facb6d9 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java @@ -53,7 +53,7 @@ public class HiddenColumnsExpandRatios extends TestBase { private String genValue() { Random rnd = new Random(); - StringBuffer str = new StringBuffer(); + StringBuilder str = new StringBuilder(); String[] strings = { "foo", "bar", "baz" }; for (int i = 0; i < 5; i++) { str.append(strings[Math.abs(rnd.nextInt() % strings.length)]) diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java index 8e6b17d81e..3426cb1b7e 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java +++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java @@ -38,7 +38,7 @@ public class TabSheetIndexOperations extends TestBase { @Override public void buttonClick(ClickEvent event) { Tab tab = tabs.getTab(2); - tab.setCaption(new StringBuffer(tab.getCaption()) + tab.setCaption(new StringBuilder(tab.getCaption()) .reverse().toString()); } }); diff --git a/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java b/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java index 2d11a94598..76c5ad8f55 100644 --- a/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java +++ b/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java @@ -9,7 +9,7 @@ import java.io.Writer; */ public class LogPrintWriter extends PrintWriter { - private final StringBuffer result = new StringBuffer(256); + private final StringBuilder result = new StringBuilder(256); public LogPrintWriter(Writer out) { super(out); |