[#1881] Use correct field name in NullPointerException

This commit is contained in:
Norman Maurer 2013-10-04 09:54:21 +02:00
parent 805a9dff8e
commit 2366c2846d

View File

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