tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r529612 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java
Date Tue, 17 Apr 2007 14:10:08 GMT
Author: remm
Date: Tue Apr 17 07:10:07 2007
New Revision: 529612

URL: http://svn.apache.org/viewvc?view=rev&rev=529612
Log:
- Protect about possible issues calling toString in escapeXml(Object).

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java?view=diff&rev=529612&r1=529611&r2=529612
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java Tue Apr 17 07:10:07
2007
@@ -180,8 +180,15 @@
     }
 
     public static String escapeXml(Object obj) {
-    	return obj == null ? "" : escapeXml(String.valueOf(obj));
+        String value = null;
+        try {
+            value = (obj == null) ? null : String.valueOf(obj);
+        } catch (Exception e) {
+            // Ignore
+        }
+        return escapeXml(value);
     }
+
     /**
      * Performs the following substring replacements
      * (to facilitate output to XML/HTML pages):



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


Mime
View raw message