You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by mb...@apache.org on 2003/10/29 04:08:49 UTC

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpState.java

mbecke      2003/10/28 19:08:49

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH 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
  No                   revision
  No                   revision
  1.22.2.3  +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.22.2.2
  retrieving revision 1.22.2.3
  diff -u -r1.22.2.2 -r1.22.2.3
  --- HttpState.java	11 Oct 2003 19:44:27 -0000	1.22.2.2
  +++ HttpState.java	29 Oct 2003 03:08:49 -0000	1.22.2.3
  @@ -646,9 +646,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()) {
  @@ -661,15 +661,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()) {
  @@ -682,15 +682,15 @@
               sbResult.append("#");
               sbResult.append(cred.toString());
           }
  -        return sbResult;
  +        return sbResult.toString();
       }
       
       /**
        * Return 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()) {
  @@ -700,7 +700,7 @@
               }
               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