tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rémy Maucherat <r...@apache.org>
Subject Re: svn commit: r1764897 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/catalina/valves/rewrite/ test/org/apache/tomcat/unittest/ webapps/docs/
Date Sat, 15 Oct 2016 15:26:47 GMT
2016-10-15 11:17 GMT+02:00 Martin Grigorov <mgrigorov@apache.org>:

> Hi Remy,
>
> On Fri, Oct 14, 2016 at 3:46 PM, <remm@apache.org> wrote:
> >              return (logger);
> > -        logger = LogFactory.getLog(logName());
> > +        logger = LogFactory.getLog(getLogName());
> >
>
> What would be the behavior here if #getLogName() returns null ?
>

It's bad and would cause NPEs.

>
> >      @Override
> > +    public String getLogName() { return null; }
> >
>
> Maybe it is better to return something like "FailedContextLog" instead ?!
> This is related to the first question above.
>

It's not used, and if it is it will cause a NPE like getLogger.

Rémy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message