Description
Every time we invoke INodesInPath#toString(), we will trigger one time byte-to-string transform operation.
private String toString(boolean vaildateObject) { if (vaildateObject) { validate(); } final StringBuilder b = new StringBuilder(getClass().getSimpleName()) .append(": path = ").append(DFSUtil.byteArray2PathString(path)) .append("\n inodes = "); ... }
But actually we only need to do at most one time. In INodesInPath, it has defined one String type variable named pathname for storing the path string value. Here we can use getPath() to replace DFSUtil.byteArray2PathString(path).