tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector CoyoteAdapter.java
Date Thu, 28 Oct 2004 05:46:02 GMT

<luehe@apache.org> wrote in message 
news:20041027225817.54645.qmail@minotaur.apache.org...
> luehe       2004/10/27 15:58:17
>
>  +
>  +    private Method[] getAllDeclaredMethods(Class c) {
>  +
>  +        if (c.equals(javax.servlet.http.HttpServlet.class)) {
>  +            return null;
>  +        }
>  +
>  +        Method[] parentMethods = 
> getAllDeclaredMethods(c.getSuperclass());

If the servlet isn't a HttpServlet (e.g. it's a JSP page) then this will 
recurse down to j.l.Object, when c.getSuperClass will return 'null', and you 
will get an NPE from the 'c.equals' line.

IMHO, this patch is an overly complex way to try and determine something 
that isn't determinable under the servlet spec (again, think JSP page :). 
You might as well just set the Allow header to any old constant set of 
methods.





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


Mime
View raw message