Skip to content

Commit

Permalink
Small optimization in DefaultHttpHeaders.clear()
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Maurer committed Aug 5, 2013
1 parent de44917 commit 20a010a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package io.netty.handler.codec.http;

import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
Expand Down Expand Up @@ -206,9 +207,7 @@ public HttpHeaders set(final String name, final Iterable<?> values) {

@Override
public HttpHeaders clear() {
for (int i = 0; i < entries.length; i ++) {
entries[i] = null;
}
Arrays.fill(entries, null);
head.before = head.after = head;
return this;
}
Expand Down

0 comments on commit 20a010a

Please sign in to comment.