Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 49219 invoked from network); 29 Oct 2003 03:12:31 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Oct 2003 03:12:31 -0000 Received: (qmail 85717 invoked by uid 500); 29 Oct 2003 03:12:10 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 85650 invoked by uid 500); 29 Oct 2003 03:12:10 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 85637 invoked by uid 500); 29 Oct 2003 03:12:10 -0000 Received: (qmail 85632 invoked from network); 29 Oct 2003 03:12:10 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 29 Oct 2003 03:12:10 -0000 Received: (qmail 49197 invoked by uid 1633); 29 Oct 2003 03:12:27 -0000 Date: 29 Oct 2003 03:12:27 -0000 Message-ID: <20031029031227.49196.qmail@minotaur.apache.org> From: mbecke@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpState.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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