diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index c682a661f1a..56950740e17 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -221,6 +221,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 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java index 321e47fcc1a..f6fe054c47d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java @@ -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 to the application writer for * using the Hadoop file system. @@ -272,6 +274,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 {