Issue #4057 - Clean up identified by PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-09-05 12:04:23 -05:00
parent 91d3ddced6
commit 2b1fe8c38d
2 changed files with 0 additions and 5 deletions

View File

@ -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;
} }

View File

@ -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 + "')");
} }