summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-05-07 01:45:41 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-05-07 01:45:41 +0000
commit485d2c4f9dd73e2193c1c40d6f0972a798521a7a (patch)
tree19e436c457a65f240ca7a31c7df31bbda73aa27c /tools
parent7dd327edea367beab84dff5f266f7be199ff93d6 (diff)
downloadclasspath-485d2c4f9dd73e2193c1c40d6f0972a798521a7a.tar.gz
2008-05-07 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/21869 * tools/gnu/classpath/tools/jar/Indexer.java, * tools/gnu/classpath/tools/javah/JniHelper.java, * tools/gnu/classpath/tools/native2ascii/Native2ASCII.java, * tools/gnu/classpath/tools/orbd/PersistentMap.java, * tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java, * tools/gnu/classpath/tools/rmic/Generator.java, * tools/gnu/classpath/tools/rmic/MethodGenerator.java, * tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java, * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java, * tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java: Swap use of StringBuffer for StringBuilder.
Diffstat (limited to 'tools')
-rw-r--r--tools/gnu/classpath/tools/jar/Indexer.java4
-rw-r--r--tools/gnu/classpath/tools/javah/JniHelper.java2
-rw-r--r--tools/gnu/classpath/tools/native2ascii/Native2ASCII.java2
-rw-r--r--tools/gnu/classpath/tools/orbd/PersistentMap.java4
-rw-r--r--tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java4
-rw-r--r--tools/gnu/classpath/tools/rmic/Generator.java4
-rw-r--r--tools/gnu/classpath/tools/rmic/MethodGenerator.java10
-rw-r--r--tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java12
-rw-r--r--tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java12
-rw-r--r--tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java6
10 files changed, 30 insertions, 30 deletions
diff --git a/tools/gnu/classpath/tools/jar/Indexer.java b/tools/gnu/classpath/tools/jar/Indexer.java
index 401c6fb6a..06c5de9fb 100644
--- a/tools/gnu/classpath/tools/jar/Indexer.java
+++ b/tools/gnu/classpath/tools/jar/Indexer.java
@@ -57,7 +57,7 @@ import java.util.jar.Manifest;
public class Indexer
extends Updater
{
- private void indexJarFile(StringBuffer result, File fileName,
+ private void indexJarFile(StringBuilder result, File fileName,
boolean verbose)
throws IOException
{
@@ -129,7 +129,7 @@ public class Indexer
super.writeCommandLineEntries(parameters, os);
// Now compute our index file and write it.
- StringBuffer contents = new StringBuffer();
+ StringBuilder contents = new StringBuilder();
indexJarFile(contents, parameters.archiveFile, parameters.verbose);
if (contents.length() != 0)
{
diff --git a/tools/gnu/classpath/tools/javah/JniHelper.java b/tools/gnu/classpath/tools/javah/JniHelper.java
index 7c508997e..f2ca90e01 100644
--- a/tools/gnu/classpath/tools/javah/JniHelper.java
+++ b/tools/gnu/classpath/tools/javah/JniHelper.java
@@ -92,7 +92,7 @@ public class JniHelper
public static String mangle(String name)
{
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (int i = 0; i < name.length(); ++i)
{
char c = name.charAt(i);
diff --git a/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java b/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
index b7752d9b3..320ec320e 100644
--- a/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
+++ b/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
@@ -138,7 +138,7 @@ public class Native2ASCII
String s = rdr.readLine();
if (s == null)
break;
- StringBuffer sb = new StringBuffer(s.length() + 80);
+ StringBuilder sb = new StringBuilder(s.length() + 80);
for (int i = 0; i < s.length(); i++)
{
char c = s.charAt(i);
diff --git a/tools/gnu/classpath/tools/orbd/PersistentMap.java b/tools/gnu/classpath/tools/orbd/PersistentMap.java
index 6c6164d21..87ade64cc 100644
--- a/tools/gnu/classpath/tools/orbd/PersistentMap.java
+++ b/tools/gnu/classpath/tools/orbd/PersistentMap.java
@@ -165,7 +165,7 @@ public class PersistentMap
*/
public String getKey(String id, String kind)
{
- StringBuffer b = new StringBuffer(id.length() + 8);
+ StringBuilder b = new StringBuilder(id.length() + 8);
appEscaping(b, id);
b.append('.');
if (kind != null && kind.length() > 0)
@@ -180,7 +180,7 @@ public class PersistentMap
* @param b a buffer to append the contents to.
* @param s a string to append.
*/
- void appEscaping(StringBuffer b, String s)
+ void appEscaping(StringBuilder b, String s)
{
char c;
for (int i = 0; i < s.length(); i++)
diff --git a/tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java b/tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java
index e853a5a1b..255946711 100644
--- a/tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java
+++ b/tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java
@@ -330,7 +330,7 @@ public class ClassRmicCompiler
{
Method m = remotemethods[i].meth;
- StringBuffer desc = new StringBuffer();
+ StringBuilder desc = new StringBuilder();
desc.append(getPrettyName(m.getReturnType()) + " ");
desc.append(m.getName() + "(");
@@ -1712,7 +1712,7 @@ public class ClassRmicCompiler
private static String getPrettyName(Class cls)
{
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
for (int count = 0;; count++)
{
if (! cls.isArray())
diff --git a/tools/gnu/classpath/tools/rmic/Generator.java b/tools/gnu/classpath/tools/rmic/Generator.java
index 64eb2eaf6..70793cf6c 100644
--- a/tools/gnu/classpath/tools/rmic/Generator.java
+++ b/tools/gnu/classpath/tools/rmic/Generator.java
@@ -53,7 +53,7 @@ public class Generator
+ resourcePath);
BufferedReader r = new BufferedReader(new InputStreamReader(in));
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
String s;
try
@@ -90,7 +90,7 @@ public class Generator
{
BufferedReader r = new BufferedReader(new StringReader(template));
String s;
- StringBuffer b = new StringBuffer(template.length());
+ StringBuilder b = new StringBuilder(template.length());
try
{
Iterator iter;
diff --git a/tools/gnu/classpath/tools/rmic/MethodGenerator.java b/tools/gnu/classpath/tools/rmic/MethodGenerator.java
index 335a0a65c..650468d94 100644
--- a/tools/gnu/classpath/tools/rmic/MethodGenerator.java
+++ b/tools/gnu/classpath/tools/rmic/MethodGenerator.java
@@ -93,7 +93,7 @@ public class MethodGenerator implements AbstractMethodGenerator
*/
public String getArgumentList()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
@@ -115,7 +115,7 @@ public class MethodGenerator implements AbstractMethodGenerator
*/
public String getArgumentNames()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
@@ -135,7 +135,7 @@ public class MethodGenerator implements AbstractMethodGenerator
*/
public String getThrows()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getExceptionTypes();
@@ -239,7 +239,7 @@ public class MethodGenerator implements AbstractMethodGenerator
*/
public String getRda()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
@@ -263,7 +263,7 @@ public class MethodGenerator implements AbstractMethodGenerator
*/
public String getStubParaWriteStatement()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
diff --git a/tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java b/tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java
index 48abb8fad..b526bbb9f 100644
--- a/tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java
+++ b/tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java
@@ -74,7 +74,7 @@ public class RmiMethodGenerator
*/
public String getArgumentList()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
@@ -96,7 +96,7 @@ public class RmiMethodGenerator
*/
public String getArgumentNames()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
@@ -116,7 +116,7 @@ public class RmiMethodGenerator
*/
public String getThrows()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getExceptionTypes();
@@ -173,7 +173,7 @@ public class RmiMethodGenerator
*/
public String getStaticMethodDeclarations()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
@@ -201,7 +201,7 @@ public class RmiMethodGenerator
if (args.length==0)
return "NO_ARGS";
- StringBuffer b = new StringBuffer("new Object[] {");
+ StringBuilder b = new StringBuilder("new Object[] {");
for (int i = 0; i < args.length; i++)
{
@@ -246,7 +246,7 @@ public class RmiMethodGenerator
*/
public String getArgListAsClassArray()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Class[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
diff --git a/tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java b/tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java
index e9b7bff0b..c441dea48 100644
--- a/tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java
+++ b/tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java
@@ -342,7 +342,7 @@ public class SourceGiopRmicCompiler
dimension++;
}
- StringBuffer brackets = new StringBuffer();
+ StringBuilder brackets = new StringBuilder();
for (int i = 0; i < dimension; i++)
{
@@ -388,7 +388,7 @@ public class SourceGiopRmicCompiler
*/
public String getIdList(Collection remotes)
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
// Keep the Ids sorted, ensuring, that the same order will be preserved
// between compilations.
@@ -420,7 +420,7 @@ public class SourceGiopRmicCompiler
String template = getResource("Stub.jav");
// Generate methods.
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Iterator iter = methods.iterator();
while (iter.hasNext())
{
@@ -444,7 +444,7 @@ public class SourceGiopRmicCompiler
*/
public String getAllInterfaces()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Iterator iter = implementedRemotes.iterator();
while (iter.hasNext())
@@ -494,7 +494,7 @@ public class SourceGiopRmicCompiler
iter = sortedMethods.iterator();
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
MethodGenerator prev = null;
@@ -539,7 +539,7 @@ public class SourceGiopRmicCompiler
imp.add("import " + ic + ";\n");
}
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
it = imp.iterator();
while (it.hasNext())
diff --git a/tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java b/tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java
index 3779c5d28..20ab8c156 100644
--- a/tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java
+++ b/tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java
@@ -56,7 +56,7 @@ public class SourceRmicCompiler extends SourceGiopRmicCompiler
String template = getResource("Stub_12.jav");
// Generate methods.
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Iterator iter = methods.iterator();
while (iter.hasNext())
{
@@ -99,7 +99,7 @@ public class SourceRmicCompiler extends SourceGiopRmicCompiler
*/
public String getStubMethodDeclarations()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Iterator iter = methods.iterator();
@@ -122,7 +122,7 @@ public class SourceRmicCompiler extends SourceGiopRmicCompiler
*/
public String getStubMethodInitializations()
{
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
Iterator iter = methods.iterator();