Henry Tang created BEAM-9453:
--------------------------------
Summary: Fix potential UnsupportedEncodingException
Key: BEAM-9453
URL: https://issues.apache.org/jira/browse/BEAM-9453
Project: Beam
Issue Type: Improvement
Components: io-java-rabbitmq
Affects Versions: 2.16.0
Reporter: Henry Tang
Fix For: Not applicable
Currently the code assigns a new string with
{code:java}
String s = new String(bytes, "UTF-8");
{code}
This has the possibility of throwing an UnsupportedEncodingException.
Using
{code:java}
new String(bytes, StandardCharsets.UTF_8){code}
avoids the possibility of throwing an UnsupportedEncodingException
--
This message was sent by Atlassian Jira
(v8.3.4#803005)