geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r706591 - in /geronimo/gshell/trunk/gshell-support: gshell-chronos/src/main/java/org/apache/geronimo/gshell/chronos/ gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/ gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/
Date Tue, 21 Oct 2008 12:21:06 GMT
Author: jdillon
Date: Tue Oct 21 05:21:05 2008
New Revision: 706591

URL: http://svn.apache.org/viewvc?rev=706591&view=rev
Log:
Use StringBuilder instead of StringBuffer

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-chronos/src/main/java/org/apache/geronimo/gshell/chronos/DurationFormatUtils.java
    geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/EnumHandler.java
    geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ReflectionToStringBuilder.java
    geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringBuilder.java
    geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringStyle.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-chronos/src/main/java/org/apache/geronimo/gshell/chronos/DurationFormatUtils.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-chronos/src/main/java/org/apache/geronimo/gshell/chronos/DurationFormatUtils.java?rev=706591&r1=706590&r2=706591&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-chronos/src/main/java/org/apache/geronimo/gshell/chronos/DurationFormatUtils.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-chronos/src/main/java/org/apache/geronimo/gshell/chronos/DurationFormatUtils.java
Tue Oct 21 05:21:05 2008
@@ -424,14 +424,14 @@
      */
     static String format(Token[] tokens, int years, int months, int days, int hours, int
minutes, int seconds,
             int milliseconds, boolean padWithZeros) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         boolean lastOutputSeconds = false;
         int sz = tokens.length;
         for (int i = 0; i < sz; i++) {
             Token token = tokens[i];
             Object value = token.getValue();
             int count = token.getCount();
-            if (value instanceof StringBuffer) {
+            if (value instanceof StringBuilder) {
                 buffer.append(value.toString());
             } else {
                 if (value == y) {
@@ -496,7 +496,7 @@
         ArrayList<Token> list = new ArrayList<Token>(array.length);
 
         boolean inLiteral = false;
-        StringBuffer buffer = null;
+        StringBuilder buffer = null;
         Token previous = null;
         int sz = array.length;
         for(int i=0; i<sz; i++) {
@@ -513,7 +513,7 @@
                       buffer = null;
                       inLiteral = false;
                   } else {
-                      buffer = new StringBuffer();
+                      buffer = new StringBuilder();
                       list.add(new Token(buffer));
                       inLiteral = true;
                   }
@@ -527,7 +527,7 @@
                 case 'S'  : value = S; break;
                 default   :
                   if(buffer == null) {
-                      buffer = new StringBuffer();
+                      buffer = new StringBuilder();
                       list.add(new Token(buffer));
                   }
                   buffer.append(ch);
@@ -634,7 +634,7 @@
                 if (this.count != tok2.count) {
                     return false;
                 }
-                if (this.value instanceof StringBuffer) {
+                if (this.value instanceof StringBuilder) {
                     return this.value.toString().equals(tok2.value.toString());
                 } else if (this.value instanceof Number) {
                     return this.value.equals(tok2.value);
@@ -679,7 +679,7 @@
             return text;
         }
 
-        StringBuffer buf = new StringBuffer(text.length());
+        StringBuilder buf = new StringBuilder(text.length());
         int start = 0, end = 0;
         while ((end = text.indexOf(repl, start)) != -1) {
             buf.append(text.substring(start, end)).append(with);
@@ -694,7 +694,7 @@
     }
 
     private static String repeat(String str, int repeat) {
-        StringBuffer buffer = new StringBuffer(repeat * str.length());
+        StringBuilder buffer = new StringBuilder(repeat * str.length());
         for (int i = 0; i < repeat; i++) {
             buffer.append(str);
         }

Modified: geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/EnumHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/EnumHandler.java?rev=706591&r1=706590&r2=706591&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/EnumHandler.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/EnumHandler.java
Tue Oct 21 05:21:05 2008
@@ -66,7 +66,7 @@
 
     @Override
     public String getDefaultToken() {
-    	StringBuffer buff = new StringBuffer();
+    	StringBuilder buff = new StringBuilder();
     	buff.append("[");
 
         for (T constants : enumType.getEnumConstants()) {

Modified: geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ReflectionToStringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ReflectionToStringBuilder.java?rev=706591&r1=706590&r2=706591&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ReflectionToStringBuilder.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ReflectionToStringBuilder.java
Tue Oct 21 05:21:05 2008
@@ -117,11 +117,11 @@
         super(object, style);
     }
 
-    public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer)
{
+    public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuilder buffer)
{
         super(object, style, buffer);
     }
 
-    public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer,
Class reflectUpToClass,
+    public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuilder buffer,
Class reflectUpToClass,
             boolean outputTransients, boolean outputStatics) {
         super(object, style, buffer);
         this.setUpToClass(reflectUpToClass);
@@ -201,7 +201,7 @@
     }
 
     public ToStringBuilder reflectionAppendArray(Object array) {
-        this.getStyle().reflectionAppendArrayDetail(this.getStringBuffer(), null, array);
+        this.getStyle().reflectionAppendArrayDetail(this.getStringBuilder(), null, array);
         return this;
     }
 

Modified: geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringBuilder.java?rev=706591&r1=706590&r2=706591&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringBuilder.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringBuilder.java
Tue Oct 21 05:21:05 2008
@@ -63,7 +63,7 @@
         defaultStyle = style;
     }
 
-    private final StringBuffer buffer;
+    private final StringBuilder buffer;
 
     /**
      * The object being output.
@@ -83,12 +83,12 @@
         this(object, style, null);
     }
 
-    public ToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer) {
+    public ToStringBuilder(Object object, ToStringStyle style, StringBuilder buffer) {
         if (style == null) {
             style = getDefaultStyle();
         }
         if (buffer == null) {
-            buffer = new StringBuffer(512);
+            buffer = new StringBuilder(512);
         }
         this.buffer = buffer;
         this.style = style;
@@ -328,7 +328,7 @@
     }
 
     public ToStringBuilder appendAsObjectToString(Object object) {
-        ObjectUtils_appendIdentityToString(this.getStringBuffer(), object);
+        ObjectUtils_appendIdentityToString(this.getStringBuilder(), object);
         return this;
     }
 
@@ -350,7 +350,7 @@
         return object;
     }
 
-    public StringBuffer getStringBuffer() {
+    public StringBuilder getStringBuilder() {
         return buffer;
     }
 
@@ -360,11 +360,11 @@
 
     public String toString() {
         if (this.getObject() == null) {
-            this.getStringBuffer().append(this.getStyle().getNullText());
+            this.getStringBuilder().append(this.getStyle().getNullText());
         } else {
-            style.appendEnd(this.getStringBuffer(), this.getObject());
+            style.appendEnd(this.getStringBuilder(), this.getObject());
         }
-        return this.getStringBuffer().toString();
+        return this.getStringBuilder().toString();
     }
 
     //
@@ -375,12 +375,12 @@
         return bool ? Boolean.TRUE : Boolean.FALSE;
     }
     
-    private static StringBuffer ObjectUtils_appendIdentityToString(StringBuffer buffer, Object
object) {
+    private static StringBuilder ObjectUtils_appendIdentityToString(StringBuilder buffer,
Object object) {
         if (object == null) {
             return null;
         }
         if (buffer == null) {
-            buffer = new StringBuffer();
+            buffer = new StringBuilder();
         }
         return buffer
             .append(object.getClass().getName())

Modified: geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringStyle.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringStyle.java?rev=706591&r1=706590&r2=706591&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringStyle.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-yarn/src/main/java/org/apache/geronimo/gshell/yarn/ToStringStyle.java
Tue Oct 21 05:21:05 2008
@@ -135,11 +135,11 @@
         super();
     }
 
-    public void appendSuper(StringBuffer buffer, String superToString) {
+    public void appendSuper(StringBuilder buffer, String superToString) {
         appendToString(buffer, superToString);
     }
 
-    public void appendToString(StringBuffer buffer, String toString) {
+    public void appendToString(StringBuilder buffer, String toString) {
         if (toString != null) {
             int pos1 = toString.indexOf(contentStart) + contentStart.length();
             int pos2 = toString.lastIndexOf(contentEnd);
@@ -154,7 +154,7 @@
         }
     }
 
-    public void appendStart(StringBuffer buffer, Object object) {
+    public void appendStart(StringBuilder buffer, Object object) {
         if (object != null) {
             appendClassName(buffer, object);
             appendIdentityHashCode(buffer, object);
@@ -165,7 +165,7 @@
         }
     }
 
-    public void appendEnd(StringBuffer buffer, Object object) {
+    public void appendEnd(StringBuilder buffer, Object object) {
         if (this.fieldSeparatorAtEnd == false) {
             removeLastFieldSeparator(buffer);
         }
@@ -173,7 +173,7 @@
         unregister(object);
     }
 
-    protected void removeLastFieldSeparator(StringBuffer buffer) {
+    protected void removeLastFieldSeparator(StringBuilder buffer) {
         int len = buffer.length();
         int sepLen = fieldSeparator.length();
         if (len > 0 && sepLen > 0 && len >= sepLen) {
@@ -190,7 +190,7 @@
         }
     }
 
-    public void append(StringBuffer buffer, String fieldName, Object value, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, Object value, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (value == null) {
@@ -203,7 +203,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendInternal(StringBuffer buffer, String fieldName, Object value, boolean
detail) {
+    protected void appendInternal(StringBuilder buffer, String fieldName, Object value, boolean
detail) {
         if (isRegistered(value)
             && !(value instanceof Number || value instanceof Boolean || value instanceof
Character)) {
            appendCyclicObject(buffer, fieldName, value);
@@ -302,109 +302,109 @@
         }
     }
 
-    protected void appendCyclicObject(StringBuffer buffer, String fieldName, Object value)
{
+    protected void appendCyclicObject(StringBuilder buffer, String fieldName, Object value)
{
        ObjectUtils_appendIdentityToString(buffer, value);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, Object value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, Object value) {
         buffer.append(value);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, Collection coll) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, Collection coll)
{
         buffer.append(coll);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, Map map) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, Map map) {
         buffer.append(map);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, Object value) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, Object value) {
         buffer.append(summaryObjectStartText);
         buffer.append(getShortClassName(value.getClass()));
         buffer.append(summaryObjectEndText);
     }
 
-    public void append(StringBuffer buffer, String fieldName, long value) {
+    public void append(StringBuilder buffer, String fieldName, long value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, long value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, long value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, int value) {
+    public void append(StringBuilder buffer, String fieldName, int value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, int value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, int value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, short value) {
+    public void append(StringBuilder buffer, String fieldName, short value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, short value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, short value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, byte value) {
+    public void append(StringBuilder buffer, String fieldName, byte value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, byte value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, byte value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, char value) {
+    public void append(StringBuilder buffer, String fieldName, char value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, char value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, char value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, double value) {
+    public void append(StringBuilder buffer, String fieldName, double value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, double value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, double value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, float value) {
+    public void append(StringBuilder buffer, String fieldName, float value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, float value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, float value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, boolean value) {
+    public void append(StringBuilder buffer, String fieldName, boolean value) {
         appendFieldStart(buffer, fieldName);
         appendDetail(buffer, fieldName, value);
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, boolean value) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, boolean value) {
         buffer.append(value);
     }
 
-    public void append(StringBuffer buffer, String fieldName, Object[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, Object[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -420,7 +420,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, Object[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, Object[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             Object item = array[i];
@@ -437,7 +437,7 @@
         buffer.append(arrayEnd);
     }
 
-    protected void reflectionAppendArrayDetail(StringBuffer buffer, String fieldName, Object
array) {
+    protected void reflectionAppendArrayDetail(StringBuilder buffer, String fieldName, Object
array) {
         buffer.append(arrayStart);
         int length = Array.getLength(array);
         for (int i = 0; i < length; i++) {
@@ -455,11 +455,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, Object[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, Object[] array)
{
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, long[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, long[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -475,7 +475,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, long[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, long[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -486,11 +486,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, long[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, long[] array) {
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, int[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, int[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -506,7 +506,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, int[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, int[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -517,11 +517,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, int[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, int[] array) {
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, short[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, short[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -537,7 +537,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, short[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, short[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -548,11 +548,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, short[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, short[] array) {
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, byte[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, byte[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -568,7 +568,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, byte[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, byte[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -579,11 +579,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, byte[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, byte[] array) {
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, char[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, char[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -599,7 +599,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, char[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, char[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -610,11 +610,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, char[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, char[] array) {
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, double[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, double[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -630,7 +630,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, double[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, double[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -641,11 +641,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, double[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, double[] array)
{
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, float[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, float[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -661,7 +661,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, float[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, float[] array) {
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -672,11 +672,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, float[] array) {
+    protected void appendSummary(StringBuilder buffer, String fieldName, float[] array) {
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    public void append(StringBuffer buffer, String fieldName, boolean[] array, Boolean fullDetail)
{
+    public void append(StringBuilder buffer, String fieldName, boolean[] array, Boolean fullDetail)
{
         appendFieldStart(buffer, fieldName);
 
         if (array == null) {
@@ -692,7 +692,7 @@
         appendFieldEnd(buffer, fieldName);
     }
 
-    protected void appendDetail(StringBuffer buffer, String fieldName, boolean[] array) {
+    protected void appendDetail(StringBuilder buffer, String fieldName, boolean[] array)
{
         buffer.append(arrayStart);
         for (int i = 0; i < array.length; i++) {
             if (i > 0) {
@@ -703,11 +703,11 @@
         buffer.append(arrayEnd);
     }
 
-    protected void appendSummary(StringBuffer buffer, String fieldName, boolean[] array)
{
+    protected void appendSummary(StringBuilder buffer, String fieldName, boolean[] array)
{
         appendSummarySize(buffer, fieldName, array.length);
     }
 
-    protected void appendClassName(StringBuffer buffer, Object object) {
+    protected void appendClassName(StringBuilder buffer, Object object) {
         if (useClassName && object != null) {
             register(object);
             if (useShortClassName) {
@@ -718,7 +718,7 @@
         }
     }
 
-    protected void appendIdentityHashCode(StringBuffer buffer, Object object) {
+    protected void appendIdentityHashCode(StringBuilder buffer, Object object) {
         if (this.isUseIdentityHashCode() && object!=null) {
             register(object);
             buffer.append('@');
@@ -726,34 +726,34 @@
         }
     }
 
-    protected void appendContentStart(StringBuffer buffer) {
+    protected void appendContentStart(StringBuilder buffer) {
         buffer.append(contentStart);
     }
 
-    protected void appendContentEnd(StringBuffer buffer) {
+    protected void appendContentEnd(StringBuilder buffer) {
         buffer.append(contentEnd);
     }
 
-    protected void appendNullText(StringBuffer buffer, String fieldName) {
+    protected void appendNullText(StringBuilder buffer, String fieldName) {
         buffer.append(nullText);
     }
 
-    protected void appendFieldSeparator(StringBuffer buffer) {
+    protected void appendFieldSeparator(StringBuilder buffer) {
         buffer.append(fieldSeparator);
     }
 
-    protected void appendFieldStart(StringBuffer buffer, String fieldName) {
+    protected void appendFieldStart(StringBuilder buffer, String fieldName) {
         if (useFieldNames && fieldName != null) {
             buffer.append(fieldName);
             buffer.append(fieldNameValueSeparator);
         }
     }
 
-    protected void appendFieldEnd(StringBuffer buffer, String fieldName) {
+    protected void appendFieldEnd(StringBuilder buffer, String fieldName) {
         appendFieldSeparator(buffer);
     }
 
-    protected void appendSummarySize(StringBuffer buffer, String fieldName, int size) {
+    protected void appendSummarySize(StringBuilder buffer, String fieldName, int size) {
         buffer.append(sizeStartText);
         buffer.append(size);
         buffer.append(sizeEndText);
@@ -1073,12 +1073,12 @@
 
     private static final String SystemUtils_LINE_SEPARATOR = System.getProperty("line.separator");
 
-    private static StringBuffer ObjectUtils_appendIdentityToString(StringBuffer buffer, Object
object) {
+    private static StringBuilder ObjectUtils_appendIdentityToString(StringBuilder buffer,
Object object) {
         if (object == null) {
             return null;
         }
         if (buffer == null) {
-            buffer = new StringBuffer();
+            buffer = new StringBuilder();
         }
         return buffer
             .append(object.getClass().getName())



Mime
View raw message