Tiny optimization that makes header addition faster in most cases
This commit is contained in:
parent
8debedf6b6
commit
5fb8e8069b
@ -60,7 +60,7 @@ public class DefaultHttpMessage implements HttpMessage {
|
||||
throw new NullPointerException("value is null");
|
||||
}
|
||||
if (headers.get(name) == null) {
|
||||
headers.put(name, new ArrayList<String>());
|
||||
headers.put(name, new ArrayList<String>(1));
|
||||
}
|
||||
headers.get(name).add(value);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user