You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/12/27 09:31:13 UTC

[jira] [Commented] (TAJO-1207) Remove redundant code in Bytes.java in tajo-common

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

ASF GitHub Bot commented on TAJO-1207:
--------------------------------------

Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/267#issuecomment-68172507
  
    Hi @charsyam,
    
    We borrowed Bytes.java from HBase for (de) serialization compatibility, and we sometimes updated the class. So, we don't need to improve this class. Anyway, thank you for your finding and your contribution!


> Remove redundant code in Bytes.java in tajo-common
> --------------------------------------------------
>
>                 Key: TAJO-1207
>                 URL: https://issues.apache.org/jira/browse/TAJO-1207
>             Project: Tajo
>          Issue Type: Improvement
>            Reporter: DaeMyung Kang
>            Assignee: DaeMyung Kang
>            Priority: Trivial
>
> in Bytes.java
> padHead and padTail
> Don't need to set array to 0.
> because java alloc byte array and initialize them as 0.
> ```java
>      byte [] padding = new byte[length];
>     //so below is redundant block
>     for (int i = 0; i < length; i++) {
>       padding[i] = 0;
>     }
>      return add(padding,a);
> ```



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)