Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-07-19 10:37:53 +0000
committerAlexander Kurtakov2021-07-23 09:05:18 +0000
commit9dc76f1c04663b202422bd3e27e853c47579a130 (patch)
tree632ca9c423a15ccef8fe0396377ec73f86b45546
parentc9c71064f4fff0551a098b199cdefeade0f7eb0e (diff)
downloadrt.equinox.p2-9dc76f1c04663b202422bd3e27e853c47579a130.tar.gz
rt.equinox.p2-9dc76f1c04663b202422bd3e27e853c47579a130.tar.xz
rt.equinox.p2-9dc76f1c04663b202422bd3e27e853c47579a130.zip
Use StringBuilder in XMLWriterI20210725-1800I20210724-1800I20210723-1800
Done with JDT UI cleanup action. Change-Id: I3b3a3c01105987fb4b80a452d2d0cb95597cd0c6 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/183163 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
index a31a7515d..cfcd0bbe7 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
@@ -122,7 +122,7 @@ public class XMLWriter implements XMLConstants {
}
public static String escape(String txt) {
- StringBuffer buffer = null;
+ StringBuilder buffer = null;
for (int i = 0; i < txt.length(); ++i) {
String replace;
char c = txt.charAt(i);
@@ -162,7 +162,7 @@ public class XMLWriter implements XMLConstants {
replace = Character.isWhitespace(c) ? " " : null; //$NON-NLS-1$
}
if (buffer == null) {
- buffer = new StringBuffer(txt.length() + 16);
+ buffer = new StringBuilder(txt.length() + 16);
buffer.append(txt.substring(0, i));
}
if (replace != null)

Back to the top