You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Ismaël Mejía (Jira)" <ji...@apache.org> on 2020/05/17 15:31:00 UTC

[jira] [Resolved] (BEAM-9453) Fix potential UnsupportedEncodingException

     [ https://issues.apache.org/jira/browse/BEAM-9453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ismaël Mejía resolved BEAM-9453.
--------------------------------
    Fix Version/s:     (was: Not applicable)
                   2.22.0
       Resolution: Fixed

> 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
>            Priority: P4
>              Labels: pull-request-available
>             Fix For: 2.22.0
>
>   Original Estimate: 0h
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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)