Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-17 06:51:15 -0400
committerLars Vogel2019-06-17 10:28:43 -0400
commit0beb11485a6b676a6a0b1b04e13810a2880ba859 (patch)
tree45821fada87091d6b447714431595388deba39e6
parente98ef744fd223b2436e2c210f6c69e87b2457390 (diff)
downloadeclipse.platform.swt-0beb11485a6b676a6a0b1b04e13810a2880ba859.tar.gz
eclipse.platform.swt-0beb11485a6b676a6a0b1b04e13810a2880ba859.tar.xz
eclipse.platform.swt-0beb11485a6b676a6a0b1b04e13810a2880ba859.zip
StringBuilder instead of StringBuffer
Change-Id: Ie88ea44706483cbe2d1004ca201c38c3213dc5cf Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java2
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet373.java4
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Table.java2
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Tree.java2
4 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index b4013d8871..cb0523fa8c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
@@ -1817,7 +1817,7 @@ boolean onNumberKeyInput(int key) {
}
typeBufferPos++;
}
- StringBuffer newText = new StringBuffer(prefix);
+ StringBuilder newText = new StringBuilder(prefix);
newText.append(typeBuffer);
newText.append(suffix);
setText(newText.toString());
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet373.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet373.java
index 09c9d2fc29..d9cf55021b 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet373.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet373.java
@@ -199,7 +199,7 @@ public class Snippet373 {
button2.setText("Refresh-Both Monitors : Zoom");
Text text2 = new Text(shell, SWT.BORDER);
Monitor[] monitors = display.getMonitors();
- StringBuffer text2String = new StringBuffer();
+ StringBuilder text2String = new StringBuilder();
for (int i = 0; i < monitors.length; i++) {
text2String.append(monitors[i].getZoom() + (i < (monitors.length - 1) ? " - " : ""));
}
@@ -208,7 +208,7 @@ public class Snippet373 {
@Override
public void mouseDown(MouseEvent e) {
Monitor[] monitors = display.getMonitors();
- StringBuffer text2String = new StringBuffer();
+ StringBuilder text2String = new StringBuilder();
for (int i = 0; i < monitors.length; i++) {
text2String.append(monitors[i].getZoom() + (i < (monitors.length - 1) ? " - " : ""));
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Table.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Table.java
index b5d96a22af..bb77faedd1 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Table.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Table.java
@@ -357,7 +357,7 @@ public class MJ_Table extends MJ_root {
Shell shell = mkShell("column SetGet Width : Make shell smaller and bigger. If you don't see COL_SIZE_ERROR in console, all is well.");
shell.setSize(SWIDTH, SHEIGHT);
shell.setLayout(new FillLayout());
- StringBuffer sbBuffer = new StringBuffer();
+ StringBuilder sbBuffer = new StringBuilder();
final Composite comp = new Composite(shell, SWT.NONE);
final Table table = new Table(comp, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION);
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Tree.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Tree.java
index d278ca273b..26542834dd 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Tree.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Tree.java
@@ -334,7 +334,7 @@ public class MJ_Tree extends MJ_root {
Shell shell = mkShell("column SetGet Width : Make shell smaller and bigger. If you don't see COL_SIZE_ERROR in console, all is well.");
shell.setSize(SWIDTH, SHEIGHT);
shell.setLayout(new FillLayout());
- StringBuffer sbBuffer = new StringBuffer();
+ StringBuilder sbBuffer = new StringBuilder();
final Composite comp = new Composite(shell, SWT.NONE);
final Tree tree = new Tree(comp, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION);

Back to the top