[#1881] Use correct field name in NullPointerException

This commit is contained in:
Norman Maurer 2013-10-04 09:54:21 +02:00
parent 8f612660b2
commit 5317995a13

View File

@ -35,10 +35,10 @@ public class DefaultHttpRequest extends DefaultHttpMessage implements HttpReques
public DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri) {
super(httpVersion);
if (method == null) {
throw new NullPointerException("getMethod");
throw new NullPointerException("method");
}
if (uri == null) {
throw new NullPointerException("getUri");
throw new NullPointerException("uri");
}
this.method = method;
this.uri = uri;
@ -66,7 +66,7 @@ public class DefaultHttpRequest extends DefaultHttpMessage implements HttpReques
@Override
public HttpRequest setUri(String uri) {
if (uri == null) {
throw new NullPointerException("method");
throw new NullPointerException("uri");
}
this.uri = uri;
return this;