hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiroshi Ikeda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
Date Thu, 15 Nov 2012 06:56:12 GMT

    [ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497809#comment-13497809
] 

Hiroshi Ikeda commented on HBASE-7128:
--------------------------------------

Oops, I find that HBaseTestCase still uses UTF8_ENCODING:
{code}
  private void init() {
    conf = HBaseConfiguration.create();
    try {
      START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_ENCODING);
    } catch (UnsupportedEncodingException e) {
      LOG.fatal("error during initialization", e);
      fail();
    }
  }
{code}

What should I do?
                
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because
of UTF-8
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-7128
>                 URL: https://issues.apache.org/jira/browse/HBASE-7128
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Hiroshi Ikeda
>            Priority: Trivial
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because
Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message