Skip to content

Commit 9a9f44a

Browse files
committed
Let BitSets auto-adapt capacity
1 parent 89b7b1c commit 9a9f44a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/main/java/org/asynchttpclient/cookie/CookieUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class CookieUtil {
2424
// cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
2525
// US-ASCII characters excluding CTLs, whitespace, DQUOTE, comma, semicolon, and backslash
2626
private static BitSet validCookieValueOctets() {
27-
BitSet bits = new BitSet(8);
27+
BitSet bits = new BitSet();
2828
bits.set(0x21);
2929
for (int i = 0x23; i <= 0x2B; i++) {
3030
bits.set(i);
@@ -47,7 +47,7 @@ private static BitSet validCookieValueOctets() {
4747
// | "/" | "[" | "]" | "?" | "="
4848
// | "{" | "}" | SP | HT
4949
private static BitSet validCookieNameOctets() {
50-
BitSet bits = new BitSet(8);
50+
BitSet bits = new BitSet();
5151
for (int i = 32; i < 127; i++) {
5252
bits.set(i);
5353
}

0 commit comments

Comments
 (0)