The current release is returning empty string for URL's that contain no query string. Prior releases of JBoss AS w. tomcat correctly returned null when URL's contained no query String.
Javadocs for getQueryString() method:
public String getQueryString()
Returns the query string that is contained in the request URL after the path. This method returns null if the URL does not have a query string. Same as the value of the CGI variable QUERY_STRING.
a String containing the query string or null if the URL contains no query string. The value is not decoded by the container.