Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-09 05:19:16 +0000
committerAlexander Kurtakov2017-09-09 05:19:16 +0000
commitb01ac61998096f896a01308f8f85cccf49eacdd5 (patch)
tree2a5d2099fb596063226054e2adbe79035d2f4ff2 /org.eclipse.ua.tests/intro/org/eclipse/ua/tests
parent00f7de7ddcabe81ebcdbbb15d6f8dc03c5fae8f0 (diff)
downloadeclipse.platform.ua-b01ac61998096f896a01308f8f85cccf49eacdd5.tar.gz
eclipse.platform.ua-b01ac61998096f896a01308f8f85cccf49eacdd5.tar.xz
eclipse.platform.ua-b01ac61998096f896a01308f8f85cccf49eacdd5.zip
Bug 520255 - Replace StringBuffer with StringBuilder in
eclipse.platform.ua Change-Id: Id1b13e8bb510dfdd4e4b8ff2f1f466f6b89fd513 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ua.tests/intro/org/eclipse/ua/tests')
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java
index fae8301ad..f24386d5d 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,10 +34,10 @@ import org.osgi.framework.Bundle;
public class IntroModelSerializer {
- private StringBuffer buffer;
+ private StringBuilder buffer;
public IntroModelSerializer(IntroModelRoot root) {
- this.buffer = new StringBuffer();
+ this.buffer = new StringBuilder();
printModelRootInfo(root, buffer);
// Root Page
@@ -64,7 +64,7 @@ public class IntroModelSerializer {
return url;
}
- private void printModelRootInfo(IntroModelRoot model, StringBuffer text) {
+ private void printModelRootInfo(IntroModelRoot model, StringBuilder text) {
text.append("Intro Model Content:"); //$NON-NLS-1$
text.append("\n======================"); //$NON-NLS-1$
text.append("\n\nModel has valid config = " + model.hasValidConfig()); //$NON-NLS-1$
@@ -89,7 +89,7 @@ public class IntroModelSerializer {
* @param text
* @param root
*/
- private void printHomePage(AbstractIntroPage rootPage, StringBuffer text) {
+ private void printHomePage(AbstractIntroPage rootPage, StringBuilder text) {
text.append("\n\nHOME PAGE: "); //$NON-NLS-1$
text.append("\n--------------"); //$NON-NLS-1$
text
@@ -104,7 +104,7 @@ public class IntroModelSerializer {
printPageStyles(rootPage, text);
}
- private void printPageStyles(AbstractIntroPage page, StringBuffer text) {
+ private void printPageStyles(AbstractIntroPage page, StringBuilder text) {
text.append("\n\tpage styles are = "); //$NON-NLS-1$
String[] styles = page.getStyles();
for (String style : styles)
@@ -129,7 +129,7 @@ public class IntroModelSerializer {
}
}
- private void printPageChildren(AbstractIntroPage page, StringBuffer text) {
+ private void printPageChildren(AbstractIntroPage page, StringBuilder text) {
text.append("\n\tpage children = " + page.getChildren().length); //$NON-NLS-1$
text.append("\n"); //$NON-NLS-1$
@@ -138,7 +138,7 @@ public class IntroModelSerializer {
}
private void printContainerChildren(AbstractIntroContainer container,
- StringBuffer text, String indent) {
+ StringBuilder text, String indent) {
AbstractIntroElement[] children = container.getChildren();
for (AbstractIntroElement element : children) {
@@ -183,7 +183,7 @@ public class IntroModelSerializer {
}
}
- private void printGroup(StringBuffer text, IntroGroup group, String indent) {
+ private void printGroup(StringBuilder text, IntroGroup group, String indent) {
text.append(indent + "GROUP: id = " + group.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "label = " + group.getLabel()); //$NON-NLS-1$
@@ -192,7 +192,7 @@ public class IntroModelSerializer {
printContainerChildren(group, text, indent + "\t\t"); //$NON-NLS-1$
}
- private void printLink(StringBuffer text, IntroLink link, String indent) {
+ private void printLink(StringBuilder text, IntroLink link, String indent) {
text.append(indent + "LINK: id = " + link.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "label = " + link.getLabel()); //$NON-NLS-1$
@@ -201,14 +201,14 @@ public class IntroModelSerializer {
text.append(indent + "style-id = " + link.getStyleId()); //$NON-NLS-1$
}
- private void printText(StringBuffer text, IntroText introText, String indent) {
+ private void printText(StringBuilder text, IntroText introText, String indent) {
text.append(indent + "TEXT: id = " + introText.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "text = " + introText.getText()); //$NON-NLS-1$
text.append(indent + "style-id = " + introText.getStyleId()); //$NON-NLS-1$
}
- private void printImage(StringBuffer text, IntroImage image, String indent) {
+ private void printImage(StringBuilder text, IntroImage image, String indent) {
text.append(indent + "IMAGE: id = " + image.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "src = " + image.getSrc()); //$NON-NLS-1$
@@ -216,7 +216,7 @@ public class IntroModelSerializer {
text.append(indent + "style-id = " + image.getStyleId()); //$NON-NLS-1$
}
- private void printHtml(StringBuffer text, IntroHTML html, String indent) {
+ private void printHtml(StringBuilder text, IntroHTML html, String indent) {
text.append(indent + "HTML: id = " + html.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
text.append(indent + "src = " + html.getSrc()); //$NON-NLS-1$
@@ -229,7 +229,7 @@ public class IntroModelSerializer {
}
- private void printInclude(StringBuffer text, IntroInclude include,
+ private void printInclude(StringBuilder text, IntroInclude include,
String indent) {
text.append(indent + "INCLUDE: configId = " + include.getConfigId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
@@ -237,11 +237,11 @@ public class IntroModelSerializer {
text.append(indent + "merge-style = " + include.getMergeStyle()); //$NON-NLS-1$
}
- private void printHead(StringBuffer text, IntroHead head, String indent) {
+ private void printHead(StringBuilder text, IntroHead head, String indent) {
text.append(indent + "HEAD: src = " + head.getSrc()); //$NON-NLS-1$
}
- private void printPageTitle(StringBuffer text, IntroPageTitle title,
+ private void printPageTitle(StringBuilder text, IntroPageTitle title,
String indent) {
text.append(indent + "TITLE: id = " + title.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
@@ -249,12 +249,12 @@ public class IntroModelSerializer {
text.append(indent + "style-id = " + title.getStyleId()); //$NON-NLS-1$
}
- private void printAnchor(StringBuffer text, IntroAnchor anchor,
+ private void printAnchor(StringBuilder text, IntroAnchor anchor,
String indent) {
text.append(indent + "ANCHOR: id = " + anchor.getId()); //$NON-NLS-1$
}
- private void printContentProvidor(StringBuffer text,
+ private void printContentProvidor(StringBuilder text,
IntroContentProvider provider, String indent) {
text.append(indent + "CONTENT PROVIDER: id = " + provider.getId()); //$NON-NLS-1$
indent = indent + "\t\t"; //$NON-NLS-1$
@@ -270,7 +270,7 @@ public class IntroModelSerializer {
*
* @param text
*/
- private void printPages(IntroPage[] pages, StringBuffer text) {
+ private void printPages(IntroPage[] pages, StringBuilder text) {
for (IntroPage page : pages) {
text.append("\n\nPAGE id = " + page.getId()); //$NON-NLS-1$
text.append("\n----------"); //$NON-NLS-1$
@@ -283,7 +283,7 @@ public class IntroModelSerializer {
}
}
- private void printModelFlagTests(IntroModelRoot model, StringBuffer text) {
+ private void printModelFlagTests(IntroModelRoot model, StringBuilder text) {
text.append("Model Flag Tests: "); //$NON-NLS-1$
text.append("\n----------------"); //$NON-NLS-1$
if (model.getPages().length == 0) {

Back to the top