On Mon, Jul 24, 2017 at 10:38 AM, Mark Thomas <ma...@apache.org> wrote:

> On 21/07/17 20:45, csuth...@apache.org wrote:
> > Author: csutherl
> > Date: Fri Jul 21 19:45:38 2017
> > New Revision: 1802639
> >
> > URL: http://svn.apache.org/viewvc?rev=1802639&view=rev
> > Log:
> > Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61253
> >
> > Add warn message when Digester.updateAttributes throws an exception
> instead of ignoring it.
> >
> > Modified:
> >     tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
> >     tomcat/trunk/webapps/docs/changelog.xml
> >
> > Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.
> java
> > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/
> tomcat/util/digester/Digester.java?rev=1802639&r1=1802638&
> r2=1802639&view=diff
> > ============================================================
> ==================
> > --- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
> (original)
> > +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Fri
> Jul 21 19:45:38 2017
> > @@ -1923,7 +1923,7 @@ public class Digester extends DefaultHan
> >                      newAttrs.setValue(i, newValue);
> >                  }
> >              } catch (Exception e) {
> > -                // ignore - let the attribute have its original value
> > +                log.warn("Attribute [" + newAttrs.getLocalName(i) + "]
> failed to update and remains [" + value + "].", e);
>
> Convention is that we use a StringManager instance for all new log
> messages to support i18n. There are rare exceptions (e.g. some debug
> messages or when a StringManager implementation isn't available on the
> class path) but this isn't one of them.
>
> Most StringManager (and Log) instances are static but there are a
> handful of exceptions - this is one - that are not. Generally, this is
> because a static instance was found (or suspected) to be the cause of a
> memory leak.
>
> There are a lot of legacy log messages that don't use a StringManager.
> Those are slowly being cleaned up as folks are making changes nearby.
>
> +1, when adding new messages. There is a significant amount of old ones
indeed :(

Rémy

Reply via email to