tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1447529 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointBase.java
Date Mon, 18 Feb 2013 23:24:16 GMT
2013/2/19  <markt@apache.org>:
> Author: markt
> Date: Mon Feb 18 22:54:44 2013
> New Revision: 1447529
>
> URL: http://svn.apache.org/r1447529
> Log:
> Use final.
> Use imports.

> Don't make log static

Why?
"log" is a private field and how it is created it cannot have
different values in different threads.

I do not see how its lifecycle differs from "sm" field that is already static.

> Modified:
>     tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointBase.java
>
> Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointBase.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointBase.java?rev=1447529&r1=1447528&r2=1447529&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointBase.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointBase.java Mon Feb 18
22:54:44 2013
> @@ -38,6 +38,8 @@ import javax.websocket.RemoteEndpoint;
>  import javax.websocket.SendHandler;
>  import javax.websocket.SendResult;
>
> +import org.apache.juli.logging.Log;
> +import org.apache.juli.logging.LogFactory;
>  import org.apache.tomcat.util.res.StringManager;
>
>  public abstract class WsRemoteEndpointBase implements RemoteEndpoint {
> @@ -45,12 +47,10 @@ public abstract class WsRemoteEndpointBa
>      private static final StringManager sm =
>              StringManager.getManager(Constants.PACKAGE_NAME);
>
> -    private static org.apache.juli.logging.Log log =
> -            org.apache.juli.logging.LogFactory.getLog(
> -                    WsRemoteEndpointBase.class);
> +    private final Log log = LogFactory.getLog(WsRemoteEndpointBase.class);
>

Best regards,
Konstantin Kolinko

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


Mime
View raw message