hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
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 GMT
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<String> DEFAULT_SCHEME_PRIORITY = Arrays.asList(new String[]
{
+    private static final List<String> 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() {



Mime
View raw message