hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r755787 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
Date Wed, 18 Mar 2009 23:45:54 GMT
Author: sebb
Date: Wed Mar 18 23:45:54 2009
New Revision: 755787

URL: http://svn.apache.org/viewvc?rev=755787&view=rev
Log:
HTTPCORE-194 - make fields final to prevent callers bypassing the null checks

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java?rev=755787&r1=755786&r2=755787&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
Wed Mar 18 23:45:54 2009
@@ -53,11 +53,13 @@
  * 
  * @since 4.0
  */
+//@NotThreadSafe // Lists are not synchronized
 public final class BasicHttpProcessor implements
     HttpProcessor, HttpRequestInterceptorList, HttpResponseInterceptorList, Cloneable {
 
-    protected final List requestInterceptors = new ArrayList(); 
-    protected final List responseInterceptors = new ArrayList();
+    // Don't allow direct access, as nulls are not allowed
+    private final List requestInterceptors = new ArrayList(); 
+    private final List responseInterceptors = new ArrayList();
 
     // non-Javadoc, see interface HttpRequestInterceptorList
     public void addRequestInterceptor(final HttpRequestInterceptor itcp) {



Mime
View raw message