Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-05-24 15:21:37 +0000
committerLars Vogel2019-06-11 10:38:40 +0000
commitd18024c8e8073f3a28f3fb5013ae3d0e6af7ceb9 (patch)
tree11ddb7b9bc65206dabc487f91e8853709978ad94 /org.eclipse.ui.examples.javaeditor
parent8900dabed95e06188f88cf4af709bf2793c982ec (diff)
downloadeclipse.platform.text-d18024c8e8073f3a28f3fb5013ae3d0e6af7ceb9.tar.gz
eclipse.platform.text-d18024c8e8073f3a28f3fb5013ae3d0e6af7ceb9.tar.xz
eclipse.platform.text-d18024c8e8073f3a28f3fb5013ae3d0e6af7ceb9.zip
Use StringBuilder instead of StringBuffer where possible.
Change-Id: Ifee0c0b2ecbdaad31ea628c4fbe87cec89897012 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor')
-rw-r--r--org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
index f8eeb6e80d9..9956e1dd5d4 100644
--- a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaAutoIndentStrategy.java
@@ -221,7 +221,7 @@ public class JavaAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
int p= (command.offset == docLength ? command.offset - 1 : command.offset);
int line= document.getLineOfOffset(p);
- StringBuffer buf= new StringBuffer(command.text);
+ StringBuilder buf= new StringBuilder(command.text);
if (command.offset < docLength && document.getChar(command.offset) == '}') {
int indLine= findMatchingOpenBracket(document, line, command.offset, 0);
if (indLine == -1) {
@@ -264,7 +264,7 @@ public class JavaAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
int indLine= findMatchingOpenBracket(document, line, command.offset, 1);
if (indLine != -1 && indLine != line) {
// take the indent of the found line
- StringBuffer replaceText= new StringBuffer(getIndentOfLine(document, indLine));
+ StringBuilder replaceText= new StringBuilder(getIndentOfLine(document, indLine));
// add the rest of the current line including the just added close bracket
replaceText.append(document.get(whiteend, command.offset - whiteend));
replaceText.append(command.text);

Back to the top