HADOOP-11878. FileContext#fixRelativePart should check for not null for a more informative exception. (Brahma Reddy Battula via kasha)
This commit is contained in:
parent
625d7ed9eb
commit
2e3d83f97b
|
@ -722,6 +722,9 @@ Release 2.8.0 - UNRELEASED
|
|||
HADOOP-12194. Support for incremental generation in the protoc plugin.
|
||||
(wang)
|
||||
|
||||
HADOOP-11878. FileContext#fixRelativePart should check for not null for a
|
||||
more informative exception. (Brahma Reddy Battula via kasha)
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HADOOP-11802: DomainSocketWatcher thread terminates sometimes after there
|
||||
|
|
|
@ -59,6 +59,8 @@ import org.apache.hadoop.security.UserGroupInformation;
|
|||
import org.apache.hadoop.security.token.Token;
|
||||
import org.apache.hadoop.util.ShutdownHookManager;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
/**
|
||||
* The FileContext class provides an interface for users of the Hadoop
|
||||
* file system. It exposes a number of file system operations, e.g. create,
|
||||
|
@ -262,6 +264,7 @@ public class FileContext {
|
|||
* has been deliberately declared private.
|
||||
*/
|
||||
Path fixRelativePart(Path p) {
|
||||
Preconditions.checkNotNull(p, "path cannot be null");
|
||||
if (p.isUriPathAbsolute()) {
|
||||
return p;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue