HADOOP-15289. FileStatus.readFields() assertion incorrect.

Contributed by Steve Loughran.

(cherry picked from commit 12ecb55ffe)
This commit is contained in:
Steve Loughran 2018-03-06 10:06:11 +00:00
parent 429e9d6c19
commit e8ecd4fa1d
1 changed files with 1 additions and 1 deletions

View File

@ -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";
}
/**