HADOOP-15289. FileStatus.readFields() assertion incorrect.
Contributed by Steve Loughran. (cherry picked from commit 12ecb55ffee2b89108eea2565e7ad955ea1fabe7)
This commit is contained in:
parent
4df200bc6d
commit
a5cb7f3616
@ -458,7 +458,7 @@ public void readFields(DataInput in) throws IOException {
|
|||||||
setSymlink((other.isSymlink() ? other.getSymlink() : null));
|
setSymlink((other.isSymlink() ? other.getSymlink() : null));
|
||||||
setPath(other.getPath());
|
setPath(other.getPath());
|
||||||
attr = flags(other.hasAcl(), other.isEncrypted(), other.isErasureCoded());
|
attr = flags(other.hasAcl(), other.isEncrypted(), other.isErasureCoded());
|
||||||
assert (isDirectory() && getSymlink() == null) || !isDirectory();
|
assert !(isDirectory() && isSymlink()) : "A directory cannot be a symlink";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user