Skip to content

Commit 4bb43e4

Browse files
committed
nit
1 parent ae0ed7c commit 4bb43e4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

netty-utils/src/main/java/org/asynchttpclient/netty/util/Utf8ByteBufCharsetDecoder.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ public class Utf8ByteBufCharsetDecoder {
2828
private static final int UTF_8_MAX_BYTES_PER_CHAR = 4;
2929
private static final char INVALID_CHAR_REPLACEMENT = '�';
3030

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());
3632

3733
private static Utf8ByteBufCharsetDecoder pooledDecoder() {
3834
Utf8ByteBufCharsetDecoder decoder = POOL.get();

0 commit comments

Comments
 (0)