Repository: hadoop Updated Branches: refs/heads/branch-3.1 429e9d6c1 -> e8ecd4fa1 refs/heads/trunk 55ba49dd0 -> 12ecb55ff
HADOOP-15289. FileStatus.readFields() assertion incorrect. Contributed by Steve Loughran. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/12ecb55f Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/12ecb55f Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/12ecb55f Branch: refs/heads/trunk Commit: 12ecb55ffee2b89108eea2565e7ad955ea1fabe7 Parents: 55ba49d Author: Steve Loughran <[email protected]> Authored: Tue Mar 6 10:05:12 2018 +0000 Committer: Steve Loughran <[email protected]> Committed: Tue Mar 6 10:05:12 2018 +0000 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/fs/FileStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/12ecb55f/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java index 0663c43..83910c4 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java @@ -502,7 +502,7 @@ public class FileStatus implements Writable, Comparable<Object>, setPath(other.getPath()); attr = attributes(other.hasAcl(), other.isEncrypted(), other.isErasureCoded(), other.isSnapshotEnabled()); - assert (isDirectory() && getSymlink() == null) || !isDirectory(); + assert !(isDirectory() && isSymlink()) : "A directory cannot be a symlink"; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
