Skip to content

Commit 2ded526

Browse files
committed
Don't use ==
1 parent b641b46 commit 2ded526

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ private ByteBufUtils() {
2727
}
2828

2929
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)) {
3131
return Utf8ByteBufCharsetDecoder.decodeUtf8(buf);
3232
} else {
3333
return buf.toString(charset);
3434
}
3535
}
3636

3737
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)) {
3939
return Utf8ByteBufCharsetDecoder.decodeUtf8(bufs);
4040
} else {
4141
CompositeByteBuf composite = Unpooled.compositeBuffer(bufs.length);

0 commit comments

Comments
 (0)