File tree 1 file changed +2
-2
lines changed
netty-utils/src/main/java/org/asynchttpclient/netty/util
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ private ByteBufUtils() {
27
27
}
28
28
29
29
public static String byteBuf2String (Charset charset , ByteBuf buf ) throws CharacterCodingException {
30
- if (charset == UTF_8 || charset == US_ASCII ) {
30
+ if (charset . equals ( UTF_8 ) || charset . equals ( US_ASCII ) ) {
31
31
return Utf8ByteBufCharsetDecoder .decodeUtf8 (buf );
32
32
} else {
33
33
return buf .toString (charset );
34
34
}
35
35
}
36
36
37
37
public static String byteBuf2String (Charset charset , ByteBuf ... bufs ) throws CharacterCodingException {
38
- if (charset == UTF_8 || charset == US_ASCII ) {
38
+ if (charset . equals ( UTF_8 ) || charset . equals ( US_ASCII ) ) {
39
39
return Utf8ByteBufCharsetDecoder .decodeUtf8 (bufs );
40
40
} else {
41
41
CompositeByteBuf composite = Unpooled .compositeBuffer (bufs .length );
You can’t perform that action at this time.
0 commit comments