Use Boolean.
This commit is contained in:
parent
3698b884e9
commit
5d1d04ca57
|
@ -3873,8 +3873,9 @@ public class DistributedFileSystem extends FileSystem
|
|||
throws IOException {
|
||||
// qualify the path to make sure that it refers to the current FS.
|
||||
final Path p = makeQualified(path);
|
||||
if (DfsPathCapabilities.hasPathCapability(p, capability)) {
|
||||
return true;
|
||||
final Boolean cap = DfsPathCapabilities.hasPathCapability(p, capability);
|
||||
if (cap != null) {
|
||||
return cap;
|
||||
}
|
||||
// this switch is for features which are in the DFS client but not
|
||||
// (yet/ever) in the WebHDFS API.
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class DfsPathCapabilities {
|
|||
* @return either a value to return or, if empty, a cue for the FS to
|
||||
* pass up to its superclass.
|
||||
*/
|
||||
public static boolean hasPathCapability(final Path path,
|
||||
public static Boolean hasPathCapability(final Path path,
|
||||
final String capability) {
|
||||
switch (validatePathCapabilityArgs(path, capability)) {
|
||||
|
||||
|
@ -56,7 +56,7 @@ public final class DfsPathCapabilities {
|
|||
case CommonPathCapabilities.FS_SYMLINKS:
|
||||
return FileSystem.areSymlinksEnabled();
|
||||
default:
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2206,8 +2206,9 @@ public class WebHdfsFileSystem extends FileSystem
|
|||
throws IOException {
|
||||
// qualify the path to make sure that it refers to the current FS.
|
||||
final Path p = makeQualified(path);
|
||||
if (DfsPathCapabilities.hasPathCapability(p, capability)) {
|
||||
return true;
|
||||
final Boolean cap = DfsPathCapabilities.hasPathCapability(p, capability);
|
||||
if (cap != null) {
|
||||
return cap;
|
||||
}
|
||||
return super.hasPathCapability(p, capability);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue