You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2009/03/03 19:31:42 UTC

svn commit: r749677 - in /tapestry/tapestry5/trunk/tapestry-core/src/main: java/org/apache/tapestry5/corelib/pages/ExceptionReport.java resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml

Author: hlship
Date: Tue Mar  3 18:31:41 2009
New Revision: 749677

URL: http://svn.apache.org/viewvc?rev=749677&view=rev
Log:
TAP5-547: In the exception report page, JVM system property org.apache.catalina.jsp_classpath should be displayed as a list, like other .path value

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java?rev=749677&r1=749676&r2=749677&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java Tue Mar  3 18:31:41 2009
@@ -25,6 +25,7 @@
 import org.apache.tapestry5.services.Session;
 
 import java.util.List;
+import java.util.regex.Pattern;
 
 /**
  * Responsible for reporting runtime exceptions. This page is quite verbose and is usually overridden in a production
@@ -37,6 +38,10 @@
 {
     private static final String PATH_SEPARATOR_PROPERTY = "path.separator";
 
+    // Match anything ending in .(something?)path.
+
+    private static final Pattern PATH_RECOGNIZER = Pattern.compile("\\..*path$");
+
     @Property
     private String attributeName;
 
@@ -100,9 +105,9 @@
         return System.getProperty(propertyName);
     }
 
-    public boolean isSimpleProperty()
+    public boolean isComplexProperty()
     {
-        return ! (propertyName.endsWith(".path") && getPropertyValue().contains(pathSeparator));
+        return PATH_RECOGNIZER.matcher(propertyName).find() && getPropertyValue().contains(pathSeparator);
     }
 
     public String[] getComplexPropertyValue()

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml?rev=749677&r1=749676&r2=749677&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml Tue Mar  3 18:31:41 2009
@@ -40,7 +40,7 @@
                         <t:loop source="systemProperties" value="propertyName">
                             <dt>${propertyName}</dt>
                             <dd>
-                                <t:if test="simpleProperty">
+                                <t:if test="! complexProperty">
                                     ${propertyValue}
                                     <p:else>
                                         <ul>