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.

Mark

>              }
>          }
>  
> 
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1802639&r1=1802638&r2=1802639&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul 21 19:45:38 2017
> @@ -58,6 +58,10 @@
>          work directory for improved performance when deploying packed WAR 
> files.
>          (markt)
>        </fix>
> +      <fix>
> +        <bug>61253</bug>: Add warn message when Digester.updateAttributes
> +        throws an exception instead of ignoring it. (csutherl)
> +      </fix>
>      </changelog>
>    </subsection>
>    <subsection name="Web applications">
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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

Reply via email to