Bug 43453 - ClassCastException at org.apache.catalina.core.StandardContext.findStatusPage(int)
ClassCastException at org.apache.catalina.core.StandardContext.findStatusPage...
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
6.0.14
Other other
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-09-23 13:50 UTC by Lucas Galfaso
Modified: 2007-09-23 20:45 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Galfaso 2007-09-23 13:50:20 UTC
StandardContext.java reads

    public String findStatusPage(int status) {
        return ((String) statusPages.get(new Integer(status)));
    }

This is wrong and it should be

    public String findStatusPage(int status) {
        return ((ErrorPage) statusPages.get(new Integer(status))).getLocation();
    }

Regards,
  lg
Comment 1 Tim Funk 2007-09-23 16:57:23 UTC
Ironically the suggested fix also yeilds a ClassCastException ( but would have 
been caught at compile time)

Fixed with alternative patch. 
Comment 2 Lucas Galfaso 2007-09-23 20:45:44 UTC
Sorry that the patch was not 100% correct, and thanks for fixing it.