bug 43453: ClassCastException at org.apache.catalina.core.StandardContext.findStatus...
authorfunkman <funkman@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 23 Sep 2007 23:53:05 +0000 (23:53 +0000)
committerfunkman <funkman@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 23 Sep 2007 23:53:05 +0000 (23:53 +0000)
In reality - I don't see anywhere that calls findStatusPage(). Is there a chance (in the future)
to drop this method from StandardContext as well as the Context interface?

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@578613 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardContext.java
webapps/docs/changelog.xml

index 3f893c0..3b92a98 100644 (file)
@@ -2938,7 +2938,11 @@ public class StandardContext
      */
     public String findStatusPage(int status) {
 
-        return ((String) statusPages.get(new Integer(status)));
+        ErrorPage errorPage = (ErrorPage)statusPages.get(new Integer(status));
+        if (errorPage!=null) {
+            return errorPage.getLocation();
+        }
+        return null;
 
     }
 
index 66ce17d..837f44d 100644 (file)
       </fix>
       <fix>
         <bug>41797</bug>: CNFE/NPE thrown from function mapper when externalizing
-        Patch by Tuomas Kiviaho- tuomas.kiviahos at ikis fi
+        Patch by Tuomas Kiviaho- tuomas.kiviahos at ikis fi (funkman)
+      </fix>
+      <fix>
+        <bug>43453</bug>: ClassCastException at 
+        org.apache.catalina.core.StandardContext.findStatusPage(int)
+         (funkman)
       </fix>
     </changelog>
   </subsection>