Skip to content

Commit

Permalink
Replace "UTF8" with StandardCharsets.UTF_8
Browse files Browse the repository at this point in the history
Avoids NON-NLS and possible UnsupportedEncodingException
  • Loading branch information
EcljpseB0T committed Jul 2, 2024
1 parent d47753c commit d008734
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
Expand Down Expand Up @@ -605,7 +606,7 @@ private static String readLine(InputStream input, ByteArrayOutputStream buffer)
}
buffer.write(c);
}
String result = buffer.toString("UTF8"); //$NON-NLS-1$
String result = buffer.toString(StandardCharsets.UTF_8);
buffer.reset();
return result;
}
Expand Down

0 comments on commit d008734

Please sign in to comment.