Return-Path: Delivered-To: apmail-hc-commits-archive@www.apache.org Received: (qmail 15770 invoked from network); 19 Mar 2009 01:25:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 01:25:16 -0000 Received: (qmail 79149 invoked by uid 500); 18 Mar 2009 23:38:35 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 79118 invoked by uid 500); 18 Mar 2009 23:38:35 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 79109 invoked by uid 99); 18 Mar 2009 23:38:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 16:38:35 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 23:38:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3A4B323888CA; Wed, 18 Mar 2009 23:38:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r755783 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client: AbstractAuthenticationHandler.java DefaultProxyAuthenticationHandler.java DefaultTargetAuthenticationHandler.java Date: Wed, 18 Mar 2009 23:38:12 -0000 To: commits@hc.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090318233812.3A4B323888CA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Wed Mar 18 23:38:11 2009 New Revision: 755783 URL: http://svn.apache.org/viewvc?rev=755783&view=rev Log: Make AbstractAuthenticationHandler immutable by changing the List to unmodifiable Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java?rev=755783&r1=755782&r2=755783&view=diff ============================================================================== --- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java (original) +++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java Wed Mar 18 23:38:11 2009 @@ -32,11 +32,14 @@ package org.apache.http.impl.client; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import net.jcip.annotations.Immutable; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.http.FormattedHeader; @@ -56,15 +59,17 @@ * * @since 4.0 */ +@Immutable public abstract class AbstractAuthenticationHandler implements AuthenticationHandler { private final Log log = LogFactory.getLog(getClass()); - private static final List DEFAULT_SCHEME_PRIORITY = Arrays.asList(new String[] { + private static final List DEFAULT_SCHEME_PRIORITY = + Collections.unmodifiableList(Arrays.asList(new String[] { "ntlm", "digest", "basic" - }); + })); public AbstractAuthenticationHandler() { super(); Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java?rev=755783&r1=755782&r2=755783&view=diff ============================================================================== --- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java (original) +++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultProxyAuthenticationHandler.java Wed Mar 18 23:38:11 2009 @@ -33,6 +33,8 @@ import java.util.Map; +import net.jcip.annotations.Immutable; + import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; @@ -44,6 +46,7 @@ * * @since 4.0 */ +@Immutable public class DefaultProxyAuthenticationHandler extends AbstractAuthenticationHandler { public DefaultProxyAuthenticationHandler() { Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java?rev=755783&r1=755782&r2=755783&view=diff ============================================================================== --- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java (original) +++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultTargetAuthenticationHandler.java Wed Mar 18 23:38:11 2009 @@ -33,6 +33,8 @@ import java.util.Map; +import net.jcip.annotations.Immutable; + import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; @@ -44,6 +46,7 @@ * * @since 4.0 */ +@Immutable public class DefaultTargetAuthenticationHandler extends AbstractAuthenticationHandler { public DefaultTargetAuthenticationHandler() {