Issue #4057 - Clean up identified by PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
91d3ddced6
commit
2b1fe8c38d
|
@ -38,13 +38,9 @@ public class HttpField
|
||||||
{
|
{
|
||||||
_header = header;
|
_header = header;
|
||||||
if (_header != null && name == null)
|
if (_header != null && name == null)
|
||||||
{
|
|
||||||
_name = _header.asString();
|
_name = _header.asString();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_name = Objects.requireNonNull(name);
|
_name = Objects.requireNonNull(name);
|
||||||
}
|
|
||||||
_value = value;
|
_value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -688,7 +688,6 @@ public class HttpFieldsTest
|
||||||
fields.add("Host", "localhost");
|
fields.add("Host", "localhost");
|
||||||
HttpField namelessField = new HttpField(HttpHeader.CONNECTION, null, "bogus");
|
HttpField namelessField = new HttpField(HttpHeader.CONNECTION, null, "bogus");
|
||||||
fields.put(namelessField);
|
fields.put(namelessField);
|
||||||
System.out.println(fields);
|
|
||||||
|
|
||||||
assertFalse(fields.containsKey(keyName), "containsKey('" + keyName + "')");
|
assertFalse(fields.containsKey(keyName), "containsKey('" + keyName + "')");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue