org.apache.http.protocol.BasicHttpProcessor is final but has protected final 
fields
-----------------------------------------------------------------------------------

                 Key: HTTPCORE-194
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-194
             Project: HttpComponents HttpCore
          Issue Type: Improvement
          Components: HttpCore
            Reporter: Sebb


org.apache.http.protocol.BasicHttpProcessor is final but has protected final 
fields which refer to mutable objects.

{code}
    protected final List requestInterceptors = new ArrayList(); 
    protected final List responseInterceptors = new ArrayList();
{code}

The protected qualifier could be reduced to package protected without affecting 
any 3rd party code.
Assuming that 3rd party code is not supposed to use the HC packages, then it 
seems to me that the fields should be made private.

The class is not currently thread-safe, but it does attempt to prevent null 
items from being added to the lists, however another package can circumvent 
this protection.
It would be safer if the fields were made private



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to