Project: Tomcat
Bug 41752 Wrong message on exception in MemoryRealm
Reported: 2007-03-02 16:28:19 | Status: resolved fixed

When Digester read tomcat-user.xml file and exception is throw, then is created new LifecycleException. As first parameter of this Exception is message string. This string is hardcoded to "memoryRealm.readXml", so I thing that log message will be wrong too! I think that there must be used StringManager. actual implementation: Digester digester = getDigester(); try { synchronized (digester) { digester.push(this); digester.parse(file); } } catch (Exception e) { throw new LifecycleException("memoryRealm.readXml", e); } finally { digester.reset(); } fixed: Digester digester = getDigester(); try { synchronized (digester) { digester.push(this); digester.parse(file); } } catch (Exception e) { throw new LifecycleException(sm.getString("memoryRealm.readXml"), e); } finally { digester.reset(); }

Files changed in fix:
java/org/apache/catalina/realm/MemoryRealm.java