File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
netty-utils/src/main/java/org/asynchttpclient/netty/util Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,7 @@ public class Utf8ByteBufCharsetDecoder {
28
28
private static final int UTF_8_MAX_BYTES_PER_CHAR = 4 ;
29
29
private static final char INVALID_CHAR_REPLACEMENT = '�' ;
30
30
31
- private static final ThreadLocal <Utf8ByteBufCharsetDecoder > POOL = new ThreadLocal <Utf8ByteBufCharsetDecoder >() {
32
- protected Utf8ByteBufCharsetDecoder initialValue () {
33
- return new Utf8ByteBufCharsetDecoder ();
34
- }
35
- };
31
+ private static final ThreadLocal <Utf8ByteBufCharsetDecoder > POOL = ThreadLocal .withInitial (() ->new Utf8ByteBufCharsetDecoder ());
36
32
37
33
private static Utf8ByteBufCharsetDecoder pooledDecoder () {
38
34
Utf8ByteBufCharsetDecoder decoder = POOL .get ();
You can’t perform that action at this time.
0 commit comments