You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Xiao Chen (JIRA)" <ji...@apache.org> on 2018/07/17 19:28:00 UTC

[jira] [Created] (HDFS-13741) Cosmetic code improvement in XAttrFormat

Xiao Chen created HDFS-13741:
--------------------------------

             Summary: Cosmetic code improvement in XAttrFormat
                 Key: HDFS-13741
                 URL: https://issues.apache.org/jira/browse/HDFS-13741
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Xiao Chen
            Assignee: Daniel Templeton


In an offline review, [~templedf] had a comment about the following code snippet.

 

{code:java title=XAttrFormat.java}
    static int toInt(XAttr.NameSpace namespace, String name) {
      long xattrStatusInt = 0; // <-- this can be combined with the line below

      xattrStatusInt = NAMESPACE.BITS
          .combine(namespace.ordinal(), xattrStatusInt);
      int nid = XAttrStorage.getNameSerialNumber(name);
      xattrStatusInt = NAME.BITS // <-- no line break necessary
          .combine(nid, xattrStatusInt);

      return (int) xattrStatusInt;
    }
 {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org