DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42446>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42446

           Summary: Condition is likely to fail in
                    org.apache.tomcat.util.digester.Digester
           Product: Tomcat 6
           Version: 6.0.11
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P4
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The updateBodyText method in class org.apache.tomcat.util.digester.Digester has
a condition that is likely to always be 'false' since the call to
IntrospectionUtils.replaceProperties returns a newly created string object.

The failure isn't critical but will cause unnecessary waste of memory.

Patch:
---
Index:
F:/Workspace/Apache2/tomcat6/java/org/apache/tomcat/util/digester/Digester.java
===================================================================
---
F:/Workspace/Apache2/tomcat6/java/org/apache/tomcat/util/digester/Digester.java
(revision 538877)
+++
F:/Workspace/Apache2/tomcat6/java/org/apache/tomcat/util/digester/Digester.java
(working copy)
@@ -2812,7 +2812,8 @@
             return bodyText; // return unchanged data
         }
 
-        if (out == in)  {
+        // if (out == in)  {
+        if (out.equals(in))  {
             // No substitutions required. Don't waste memory creating
             // a new buffer
             return bodyText;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to