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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to