Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#80 HttpServletRequestSimulator throws NullPointerException

open
nobody
None
5
2005-09-30
2005-09-30
No

HttpServletRequestSimulator throws NullPointerException
whenever calling request.getRequestURL().

Example:

String queryString =
StringUtils.isEmpty(request.getQueryString()) ? "" :
request.getQueryString(); // works fine

StringBuffer requestURL = request.getRequestURL() ==
null ? new StringBuffer() : request.getRequestURL();
// works at runtime, but when a test is run, the
NullPointerException is thrown

Discussion