hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r673172 - in /httpcomponents/httpclient/trunk: ./ module-client/src/main/java/org/apache/http/client/protocol/ module-client/src/main/java/org/apache/http/impl/client/ module-client/src/main/java/org/apache/http/impl/conn/ module-clie
Date Tue, 01 Jul 2008 21:50:58 GMT
On 01/07/2008, olegk@apache.org <olegk@apache.org> wrote:
> Author: olegk
>  Date: Tue Jul  1 11:52:41 2008
>  New Revision: 673172
>
>  URL: http://svn.apache.org/viewvc?rev=673172&view=rev
>  Log:
>  HTTPCLIENT-668: removed static loggers
>
>  Modified:
>     httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestProxyAuthentication.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestTargetAuthentication.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/IdleConnectionHandler.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RefQueueWorker.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java
>     httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
>
>  Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
>  URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=673172&r1=673171&r2=673172&view=diff
>  ==============================================================================
>  --- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
>  +++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Tue Jul  1 11:52:41 2008
>  @@ -1,6 +1,9 @@
>   Changes since 4.0 Alpha 4
>   -------------------
>
>  +* [HTTPCLIENT-668] Do not use static loggers
>  +  Contributed by Oleg Kalnichevski <olegk at apache.org>
>  +
>   * [HTTPCLIENT-781] Respect Keep-Alive header's timeout value.
>    Contributed by Sam Berlin <sberlin at apache.org>
>
>
>  Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
>  URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java?rev=673172&r1=673171&r2=673172&view=diff
>  ==============================================================================
>  --- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
(original)
>  +++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
Tue Jul  1 11:52:41 2008
>  @@ -69,7 +69,7 @@
>   */
>   public class RequestAddCookies implements HttpRequestInterceptor {
>
>  -    private static final Log LOG = LogFactory.getLog(RequestAddCookies.class);
>  +    private transient final Log log = LogFactory.getLog(getClass());
>
>      public RequestAddCookies() {
>          super();
>  @@ -88,7 +88,7 @@
>          CookieStore cookieStore = (CookieStore) context.getAttribute(
>                  ClientContext.COOKIE_STORE);
>          if (cookieStore == null) {
>  -            LOG.info("Cookie store not available in HTTP context");
>  +            this.log.info("Cookie store not available in HTTP context");
>              return;
>          }
>
>  @@ -96,7 +96,7 @@
>          CookieSpecRegistry registry= (CookieSpecRegistry) context.getAttribute(
>                  ClientContext.COOKIESPEC_REGISTRY);
>          if (registry == null) {
>  -            LOG.info("CookieSpec registry not available in HTTP context");
>  +            this.log.info("CookieSpec registry not available in HTTP context");
>              return;
>          }

I'm not sure why the loggers were made transient - surely that is only
needed if the class is serializable *and* one wishes to avoid changing
the serialVersionUID? In which case the readResolve() method needs to
be added to ensure that the transient field is initialised (as
described in the Wiki).

S///

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


Mime
View raw message