Fix NPE raised by HttpHeaders.equalsIgnoreCases() when one of its arguments is null

This commit is contained in:
Trustin Lee 2013-11-28 15:51:13 +09:00
parent 6ade866d24
commit 313365cd5c

View File

@ -1161,6 +1161,10 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
return true;
}
if (name1 == null || name2 == null) {
return false;
}
int nameLen = name1.length();
if (nameLen != name2.length()) {
return false;