commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbe...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpState.java
Date Wed, 29 Oct 2003 03:12:27 GMT
mbecke      2003/10/28 19:12:27

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpState.java
  Log:
  Fixes possible runtime errors in pre-1.4 JREs when compiling with a 1.4 JDK and using
  StringBuffer.append(StringBuffer).
  
  Revision  Changes    Path
  1.29      +13 -13    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java
  
  Index: HttpState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- HttpState.java	20 Oct 2003 22:17:12 -0000	1.28
  +++ HttpState.java	29 Oct 2003 03:12:27 -0000	1.29
  @@ -504,9 +504,9 @@
       /**
        * Returns a string representation of the proxy credentials
        * @param proxyCredMap The proxy credentials
  -     * @return StringBuffer The string representation.
  +     * @return The string representation.
        */
  -    private static StringBuffer getProxyCredentialsStringRepresentation(final Map proxyCredMap)
{
  +    private static String getProxyCredentialsStringRepresentation(final Map proxyCredMap)
{
           StringBuffer sbResult = new StringBuffer();
           Iterator iter = proxyCredMap.keySet().iterator();
           while (iter.hasNext()) {
  @@ -519,15 +519,15 @@
               sbResult.append("#");
               sbResult.append(cred.toString());
           }
  -        return sbResult;
  +        return sbResult.toString();
       }
       
       /**
        * Returns a string representation of the credentials.
        * @param credMap The credentials.
  -     * @return StringBuffer The string representation.
  +     * @return The string representation.
        */
  -    private static StringBuffer getCredentialsStringRepresentation(final Map credMap) {
  +    private static String getCredentialsStringRepresentation(final Map credMap) {
           StringBuffer sbResult = new StringBuffer();
           Iterator iter = credMap.keySet().iterator();
           while (iter.hasNext()) {
  @@ -540,15 +540,15 @@
               sbResult.append("#");
               sbResult.append(cred.toString());
           }
  -        return sbResult;
  +        return sbResult.toString();
       }
       
       /**
        * Returns a string representation of the cookies.
        * @param cookies The cookies
  -     * @return StringBuffer The string representation.
  +     * @return The string representation.
        */
  -    private static StringBuffer getCookiesStringRepresentation(final List cookies) {
  +    private static String getCookiesStringRepresentation(final List cookies) {
           StringBuffer sbResult = new StringBuffer();
           Iterator iter = cookies.iterator();
           while (iter.hasNext()) {
  @@ -558,6 +558,6 @@
               }
               sbResult.append(ck.toExternalForm());
           }
  -        return sbResult;
  +        return sbResult.toString();
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message