harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r785963 - in /harmony/enhanced/classlib/trunk/modules: luni/src/main/java/java/io/ luni/src/main/java/java/lang/reflect/ luni/src/main/java/java/net/ luni/src/main/java/java/util/ luni/src/main/java/org/apache/harmony/luni/internal/net/www/...
Date Thu, 18 Jun 2009 08:55:48 GMT
Author: regisxu
Date: Thu Jun 18 08:55:47 2009
New Revision: 785963

URL: http://svn.apache.org/viewvc?rev=785963&view=rev
Log:
replace local StringBuffer variables with StringBuilder in luni and nio modules

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StreamTokenizer.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Modifier.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ServerSocket.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URIEncoderDecoder.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLEncoder.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/BitSet.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Calendar.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyClassFile.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/CharBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/DoubleBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/FloatBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/IntBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/LongBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ShortBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
Thu Jun 18 08:55:47 2009
@@ -295,7 +295,7 @@
      */
     @Deprecated
     public final String readLine() throws IOException {
-        StringBuffer line = new StringBuffer(80); // Typical line length
+        StringBuilder line = new StringBuilder(80); // Typical line length
         boolean foundTerminator = false;
         while (true) {
             int nextByte = in.read();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StreamTokenizer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StreamTokenizer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StreamTokenizer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StreamTokenizer.java
Thu Jun 18 08:55:47 2009
@@ -336,7 +336,7 @@
         }
         // Check for words
         if ((currentType & TOKEN_WORD) != 0) {
-            StringBuffer word = new StringBuffer(20);
+            StringBuilder word = new StringBuilder(20);
             while (true) {
                 word.append((char) currentChar);
                 currentChar = read();
@@ -353,7 +353,7 @@
         // Check for quoted character
         if (currentType == TOKEN_QUOTE) {
             int matchQuote = currentChar;
-            StringBuffer quoteString = new StringBuffer();
+            StringBuilder quoteString = new StringBuilder();
             int peekOne = read();
             while (peekOne >= 0 && peekOne != matchQuote && peekOne !=
'\r'
                     && peekOne != '\n') {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Modifier.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Modifier.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Modifier.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Modifier.java
Thu Jun 18 08:55:47 2009
@@ -279,9 +279,7 @@
      */
     @SuppressWarnings("nls")
     public static java.lang.String toString(int modifiers) {
-        StringBuffer buf;
-
-        buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         if (isPublic(modifiers)) {
             buf.append("public ");

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ServerSocket.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ServerSocket.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ServerSocket.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ServerSocket.java
Thu Jun 18 08:55:47 2009
@@ -328,7 +328,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer result = new StringBuffer(64);
+        StringBuilder result = new StringBuilder(64);
         result.append("ServerSocket["); //$NON-NLS-1$
         if (!isBound()) {
             return result.append("unbound]").toString(); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java Thu
Jun 18 08:55:47 2009
@@ -257,7 +257,7 @@
     @SuppressWarnings("nls")
     @Override
     public String toString() {
-        return new StringBuffer(100).append("Socket[addr=").append(
+        return new StringBuilder(100).append("Socket[addr=").append(
                 getInetAddress()).append(",port=").append(port).append(
                 ",localport=").append(getLocalPort()).append("]").toString();
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
Thu Jun 18 08:55:47 2009
@@ -211,7 +211,7 @@
         }
         boolean parsing = true;
         String action;
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         int pos = 0, length = actions.length();
         while (parsing) {
             char c;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java Thu Jun 18
08:55:47 2009
@@ -106,7 +106,7 @@
      */
     public URI(String scheme, String ssp, String frag)
             throws URISyntaxException {
-        StringBuffer uri = new StringBuffer();
+        StringBuilder uri = new StringBuilder();
         if (scheme != null) {
             uri.append(scheme);
             uri.append(':');
@@ -166,7 +166,7 @@
             throw new URISyntaxException(path, Msg.getString("K0302")); //$NON-NLS-1$
         }
 
-        StringBuffer uri = new StringBuffer();
+        StringBuilder uri = new StringBuilder();
         if (scheme != null) {
             uri.append(scheme);
             uri.append(':');
@@ -270,7 +270,7 @@
             throw new URISyntaxException(path, Msg.getString("K0302")); //$NON-NLS-1$
         }
 
-        StringBuffer uri = new StringBuffer();
+        StringBuilder uri = new StringBuilder();
         if (scheme != null) {
             uri.append(scheme);
             uri.append(':');
@@ -994,7 +994,7 @@
      * converts the hex values following the '%' to lowercase
      */
     private String convertHexToLowerCase(String s) {
-        StringBuffer result = new StringBuffer(""); //$NON-NLS-1$
+        StringBuilder result = new StringBuilder(""); //$NON-NLS-1$
         if (s.indexOf('%') == -1) {
             return s;
         }
@@ -1357,7 +1357,7 @@
         }
 
         // put the path back together
-        StringBuffer newpath = new StringBuffer();
+        StringBuilder newpath = new StringBuilder();
         if (path.startsWith("/")) { //$NON-NLS-1$
             newpath.append('/');
         }
@@ -1548,7 +1548,7 @@
      */
     private void setSchemeSpecificPart() {
         // ssp = [//authority][path][?query]
-        StringBuffer ssp = new StringBuffer();
+        StringBuilder ssp = new StringBuilder();
         if (authority != null) {
             ssp.append("//" + authority); //$NON-NLS-1$
         }
@@ -1631,7 +1631,7 @@
     @Override
     public String toString() {
         if (string == null) {
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             if (scheme != null) {
                 result.append(scheme);
                 result.append(':');
@@ -1670,7 +1670,7 @@
      * and converts escaped octets to lowercase.
      */
     private String getHashString() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         if (scheme != null) {
             result.append(scheme.toLowerCase());
             result.append(':');

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URIEncoderDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URIEncoderDecoder.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URIEncoderDecoder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URIEncoderDecoder.java
Thu Jun 18 08:55:47 2009
@@ -112,7 +112,7 @@
      */
     static String quoteIllegal(String s, String legal)
             throws UnsupportedEncodingException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < s.length(); i++) {
             char ch = s.charAt(i);
             if ((ch >= 'a' && ch <= 'z')
@@ -148,7 +148,7 @@
      * @return java.lang.String the converted string
      */
     static String encodeOthers(String s) throws UnsupportedEncodingException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < s.length(); i++) {
             char ch = s.charAt(i);
             if (ch <= 127) {
@@ -183,7 +183,7 @@
      */
     static String decode(String s) throws UnsupportedEncodingException {
 
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         for (int i = 0; i < s.length();) {
             char c = s.charAt(i);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
Thu Jun 18 08:55:47 2009
@@ -758,7 +758,7 @@
      * @return the string to be parsed
      */
     private String parseTypeString(String typeString) {
-        StringBuffer typeStringBuffer = new StringBuffer(typeString);
+        StringBuilder typeStringBuffer = new StringBuilder(typeString);
         for (int i = 0; i < typeStringBuffer.length(); i++) {
             // if non-alphanumeric, replace it with '_'
             char c = typeStringBuffer.charAt(i);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLEncoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLEncoder.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLEncoder.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLEncoder.java Thu
Jun 18 08:55:47 2009
@@ -49,7 +49,7 @@
      */
     @Deprecated
     public static String encode(String s) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < s.length(); i++) {
             char ch = s.charAt(i);
             if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <=
'Z')

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java
Thu Jun 18 08:55:47 2009
@@ -305,7 +305,7 @@
      * @see URL#toExternalForm()
      */
     protected String toExternalForm(URL url) {
-        StringBuffer answer = new StringBuffer(url.getProtocol().length()
+        StringBuilder answer = new StringBuilder(url.getProtocol().length()
                 + url.getFile().length() + 16);
         answer.append(url.getProtocol());
         answer.append(':');

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/BitSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/BitSet.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/BitSet.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/BitSet.java Thu Jun
18 08:55:47 2009
@@ -818,7 +818,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer(bits.length / 2);
+        StringBuilder sb = new StringBuilder(bits.length / 2);
         int bitCount = 0;
         sb.append('{');
         boolean comma = false;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Calendar.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Calendar.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Calendar.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Calendar.java Thu
Jun 18 08:55:47 2009
@@ -1316,7 +1316,7 @@
     @Override
     @SuppressWarnings("nls")
     public String toString() {
-        StringBuffer result = new StringBuffer(getClass().getName() + "[time="
+        StringBuilder result = new StringBuilder(getClass().getName() + "[time="
                 + (isTimeSet ? String.valueOf(time) : "?")
                 + ",areFieldsSet="
                 + areFieldsSet

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java Thu Jun
18 08:55:47 2009
@@ -390,7 +390,7 @@
         int hour = -1, minute = -1, second = -1, zoneOffset = 0, minutesOffset = 0;
         boolean zone = false;
         final int PAD = 0, LETTERS = 1, NUMBERS = 2;
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
 
         while (offset <= length) {
             char next = offset < length ? string.charAt(offset) : '\r';

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java Thu Jun
18 08:55:47 2009
@@ -477,7 +477,7 @@
      */
     public String getDisplayName(Locale locale) {
         int count = 0;
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         if (languageCode.length() > 0) {
             buffer.append(getDisplayLanguage(locale));
             count++;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java Thu
Jun 18 08:55:47 2009
@@ -194,7 +194,7 @@
         if (out == null) {
             throw new NullPointerException();
         }
-        StringBuffer buffer = new StringBuffer(80);
+        StringBuilder buffer = new StringBuilder(80);
         Enumeration<?> keys = propertyNames();
         while (keys.hasMoreElements()) {
             String key = (String) keys.nextElement();
@@ -230,7 +230,7 @@
         if (writer == null) {
             throw new NullPointerException();
         }
-        StringBuffer buffer = new StringBuffer(80);
+        StringBuilder buffer = new StringBuilder(80);
         Enumeration<?> keys = propertyNames();
         while (keys.hasMoreElements()) {
             String key = (String) keys.nextElement();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java Thu
Jun 18 08:55:47 2009
@@ -385,7 +385,7 @@
     }
 
     private static String formatTimeZoneName(String name, int offset) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         int index = offset, length = name.length();
         buf.append(name.substring(0, offset));
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java Thu Jun
18 08:55:47 2009
@@ -1009,7 +1009,7 @@
             return "[]"; //$NON-NLS-1$
         }
         int length = elementCount - 1;
-        StringBuffer buffer = new StringBuffer(elementCount * 16);
+        StringBuilder buffer = new StringBuilder(elementCount * 16);
         buffer.append('[');
         for (int i = 0; i < length; i++) {
             if (elementData[i] == this) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
Thu Jun 18 08:55:47 2009
@@ -396,7 +396,7 @@
      * Read a line of text and return it for possible parsing
      */
     private String readLine() throws IOException {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         int c;
         while ((c = ctrlInput.read()) != '\n') {
             sb.append((char) c);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
Thu Jun 18 08:55:47 2009
@@ -986,7 +986,7 @@
      */
     String readln() throws IOException {
         boolean lastCr = false;
-        StringBuffer result = new StringBuffer(80);
+        StringBuilder result = new StringBuilder(80);
         int c = is.read();
         if (c < 0) {
             return null;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
Thu Jun 18 08:55:47 2009
@@ -99,7 +99,7 @@
      */
     @Override
     protected String toExternalForm(URL url) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("jar:"); //$NON-NLS-1$
         sb.append(url.getFile());
         String ref = url.getRef();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyClassFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyClassFile.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyClassFile.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyClassFile.java
Thu Jun 18 08:55:47 2009
@@ -101,7 +101,7 @@
 
     static char[] getConstantPoolName(Constructor<?> method) /* (ILjava/lang/Thread;)V
*/{
         Class[] parameters = method.getParameterTypes();
-        StringBuffer buffer = new StringBuffer(parameters.length + 1 * 20);
+        StringBuilder buffer = new StringBuilder(parameters.length + 1 * 20);
         buffer.append('(');
         for (Class<?> element : parameters) {
             buffer.append(getConstantPoolName(element));
@@ -113,7 +113,7 @@
 
     static char[] getConstantPoolName(Method method) /* (ILjava/lang/Thread;)Ljava/lang/Object;
*/{
         Class[] parameters = method.getParameterTypes();
-        StringBuffer buffer = new StringBuffer(parameters.length + 1 * 20);
+        StringBuilder buffer = new StringBuilder(parameters.length + 1 * 20);
         buffer.append('(');
         for (Class<?> element : parameters) {
             buffer.append(getConstantPoolName(element));

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java
Thu Jun 18 08:55:47 2009
@@ -121,7 +121,7 @@
 		int year = -1, month = -1, date = -1;
 		int hour = -1, minute = -1, second = -1;
 		final int PAD = 0, LETTERS = 1, NUMBERS = 2;
-		StringBuffer buffer = new StringBuffer();
+		StringBuilder buffer = new StringBuilder();
 
 		while (offset <= length) {
 			char next = offset < length ? string.charAt(offset) : '\r';
@@ -270,7 +270,7 @@
 	public static String decode(String s, boolean convertPlus) {
 		if (!convertPlus && s.indexOf('%') == -1)
 			return s;
-		StringBuffer result = new StringBuffer(s.length());
+		StringBuilder result = new StringBuilder(s.length());
 		ByteArrayOutputStream out = new ByteArrayOutputStream();
 		for (int i = 0; i < s.length();) {
 			char c = s.charAt(i);

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ByteBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ByteBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ByteBuffer.java
Thu Jun 18 08:55:47 2009
@@ -1047,7 +1047,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(", status: capacity="); //$NON-NLS-1$
         buf.append(capacity());

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/CharBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/CharBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/CharBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/CharBuffer.java
Thu Jun 18 08:55:47 2009
@@ -686,7 +686,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer strbuf = new StringBuffer();
+        StringBuilder strbuf = new StringBuilder();
         for (int i = position; i < limit; i++) {
             strbuf.append(get(i));
         }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/DoubleBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/DoubleBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/DoubleBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/DoubleBuffer.java
Thu Jun 18 08:55:47 2009
@@ -528,7 +528,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(", status: capacity="); //$NON-NLS-1$
         buf.append(capacity());

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/FloatBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/FloatBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/FloatBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/FloatBuffer.java
Thu Jun 18 08:55:47 2009
@@ -528,7 +528,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(", status: capacity="); //$NON-NLS-1$
         buf.append(capacity());

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/IntBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/IntBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/IntBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/IntBuffer.java
Thu Jun 18 08:55:47 2009
@@ -520,7 +520,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(", status: capacity="); //$NON-NLS-1$
         buf.append(capacity());

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/LongBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/LongBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/LongBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/LongBuffer.java
Thu Jun 18 08:55:47 2009
@@ -525,7 +525,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(", status: capacity="); //$NON-NLS-1$
         buf.append(capacity());

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ShortBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ShortBuffer.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ShortBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/ShortBuffer.java
Thu Jun 18 08:55:47 2009
@@ -524,7 +524,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(", status: capacity="); //$NON-NLS-1$
         buf.append(capacity());

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java?rev=785963&r1=785962&r2=785963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java
Thu Jun 18 08:55:47 2009
@@ -195,7 +195,7 @@
     @Override
     @SuppressWarnings("nls")
     public final String toString() {
-        StringBuffer buffer = new StringBuffer(64); // Guess length of string
+        StringBuilder buffer = new StringBuilder(64); // Guess length of string
         buffer.append("FileLock: [position=");
         buffer.append(position);
         buffer.append(", size=");



Mime
View raw message