#71 HttpServletRequestSimulator.getRequestURL results in NPE

open
nobody
None
5
2005-02-09
2005-02-09
Manish Hatwalne
No

HttpServletRequestSimulator.getRequestURL results in
NullPointerException -

We have a struts framework with GlobalExceptionHandler
which also logs request URL for which the exception
occcurred. I wrote a test to test this
GlobalExceptionHandler with Junit and HTTPUnit,
however, HttpUnit's implementation of
HttpServletRequest fails with NulPointerException
instead of returning null or some URL.

[junit] java.lang.NullPointerException
[junit] at
java.lang.StringBuffer.<init>(StringBuffer.java:129)
[junit] at
servletunit.HttpServletRequestSimulator.getRequestURL(HttpServletRequestSimulator.java:821)
[junit] at

I think this is some bug here.

rgds,
- Manish

Discussion