From 8216dc1fd9d31867770439985c3d66570330e4c7 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 22 Feb 2011 17:22:47 -0800 Subject: Remove most of our remaining non-API StringBuffer usage. Change-Id: Ia2c621d8a9dfe04cd55aac652d1ac9ea4398afd1 --- xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java | 6 +++--- xml/src/main/java/org/xmlpull/v1/sax2/Driver.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'xml/src/main/java/org/xmlpull') diff --git a/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java b/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java index 8ad1b89..644d01d 100644 --- a/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java +++ b/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java @@ -175,7 +175,7 @@ public class XmlPullParserFactory { if (parserClasses.size() == 0) throw new XmlPullParserException ("No valid parser classes found in "+classNamesLocation); - final StringBuffer issues = new StringBuffer (); + final StringBuilder issues = new StringBuilder(); for (int i = 0; i < parserClasses.size(); i++) { final Class ppClass = (Class) parserClasses.get(i); @@ -221,7 +221,7 @@ public class XmlPullParserFactory { ("No valid serializer classes found in "+classNamesLocation); } - final StringBuffer issues = new StringBuffer (); + final StringBuilder issues = new StringBuilder (); for (int i = 0; i < serializerClasses.size (); i++) { final Class ppClass = (Class) serializerClasses.get(i); @@ -269,7 +269,7 @@ public class XmlPullParserFactory { if (is == null) throw new XmlPullParserException ("resource not found: "+RESOURCE_NAME +" make sure that parser implementing XmlPull API is available"); - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); while (true) { final int ch = is.read(); diff --git a/xml/src/main/java/org/xmlpull/v1/sax2/Driver.java b/xml/src/main/java/org/xmlpull/v1/sax2/Driver.java index 0bd2d4f..88cffd7 100644 --- a/xml/src/main/java/org/xmlpull/v1/sax2/Driver.java +++ b/xml/src/main/java/org/xmlpull/v1/sax2/Driver.java @@ -358,7 +358,7 @@ public class Driver implements Locator, XMLReader, Attributes "start tag must be read before skiping subtree"+pp.getPositionDescription()); } final int[] holderForStartAndLength = new int[2]; - final StringBuffer rawName = new StringBuffer(16); + final StringBuilder rawName = new StringBuilder(16); String prefix = null; String name = null; int level = pp.getDepth() - 1; -- cgit v1.1