diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-28 07:45:09 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-28 08:45:09 +0300 |
commit | 7fd440d2448587f7e9958e84c84ec2bfd30ba8a0 (patch) | |
tree | c0186a8d940f07c060fcaf4b03e82271bfa9e5c2 /uitest | |
parent | cb91ab76eecbf85ad598fc5054fa2ec5ab3308f6 (diff) | |
download | vaadin-framework-7fd440d2448587f7e9958e84c84ec2bfd30ba8a0.tar.gz vaadin-framework-7fd440d2448587f7e9958e84c84ec2bfd30ba8a0.zip |
Use single character for StringBuilder.append (#10102)
Diffstat (limited to 'uitest')
6 files changed, 16 insertions, 16 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java index 790ee06c20..45f0bb47fe 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java +++ b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java @@ -161,12 +161,12 @@ public class TestForStyledUpload extends LegacyApplication if (up.isUploading()) { sb.append("Uploading..."); sb.append(up.getBytesRead()); - sb.append("/"); + sb.append('/'); sb.append(up.getUploadSize()); - sb.append(" "); + sb.append(' '); sb.append(Math.round( 100 * up.getBytesRead() / (double) up.getUploadSize())); - sb.append("%"); + sb.append('%'); } else { sb.append("Idle"); } diff --git a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java index 24e4683f5e..5d858aadd6 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java +++ b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java @@ -278,12 +278,12 @@ public class TestForUpload extends CustomComponent if (up.isUploading()) { sb.append("Uploading..."); sb.append(up.getBytesRead()); - sb.append("/"); + sb.append('/'); sb.append(up.getUploadSize()); - sb.append(" "); + sb.append(' '); sb.append(Math.round( 100 * up.getBytesRead() / (double) up.getUploadSize())); - sb.append("%"); + sb.append('%'); } else { sb.append("Idle"); } diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java index 40e7f82014..68856973fd 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java +++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java @@ -246,15 +246,15 @@ public class TestSizeableIncomponents extends LegacyApplication { public String getTestableName() { StringBuffer sb = new StringBuffer(); sb.append(classToTest.getName().replaceAll("com.vaadin.ui.", "")); - sb.append("["); + sb.append('['); for (Iterator<Configuration> i = configurations.iterator(); i .hasNext();) { sb.append((i.next()).getDescription()); if (i.hasNext()) { - sb.append(","); + sb.append(','); } } - sb.append("]"); + sb.append(']'); return sb.toString(); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java index a71952d53e..d0bd23110e 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java @@ -132,13 +132,13 @@ public class GridDragAndDrop extends AbstractTestUIWithLog { // Set data generator dragSource.setDragDataGenerator("application/json", person -> { StringBuilder builder = new StringBuilder(); - builder.append("{"); + builder.append('{'); builder.append("\"First Name\":"); builder.append("\"" + person.getFirstName() + "\""); - builder.append(","); + builder.append(','); builder.append("\"Last Name\":"); builder.append("\"" + person.getLastName() + "\""); - builder.append("}"); + builder.append('}'); return builder.toString(); }); 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 936289223d..af091b9036 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 @@ -57,7 +57,7 @@ public class HiddenColumnsExpandRatios extends TestBase { String[] strings = { "foo", "bar", "baz" }; for (int i = 0; i < 5; i++) { str.append(strings[Math.abs(rnd.nextInt() % strings.length)]) - .append(" "); + .append(' '); } return str.toString(); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java index b7995e7b8a..8eba127abd 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java +++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java @@ -173,10 +173,10 @@ public class WindowCloseShortcuts extends AbstractTestUI { sb.append("<" + producedElem.tagName() + ""); for (String attrName : names) { - sb.append(" ").append(attrName).append("=").append("\'") + sb.append(' ').append(attrName).append('=').append("\'") .append(producedElem.attr(attrName)).append("\'"); } - sb.append(">"); + sb.append('>'); for (Node child : producedElem.childNodes()) { if (child instanceof Element) { elementToHtml((Element) child, sb); @@ -185,7 +185,7 @@ public class WindowCloseShortcuts extends AbstractTestUI { sb.append(text.trim()); } } - sb.append("</").append(producedElem.tagName()).append(">"); + sb.append("</").append(producedElem.tagName()).append('>'); return sb.toString(); } |