From 0daa5ada68db483275aaa7f2ed9a2b5eaf5bb9bd Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Thu, 14 May 2015 14:17:36 +0530 Subject: [PATCH] HADOOP-8174. Remove confusing comment in Path#isAbsolute() (Contributed by Suresh Srinivas) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/fs/Path.java | 12 ++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 5e6b9ea4c0..bf39c94487 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -677,6 +677,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11361. Fix a race condition in MetricsSourceAdapter.updateJmxCache. (Brahma Reddy Battula via ozawa) + HADOOP-8174. Remove confusing comment in Path#isAbsolute() + (Suresh Srinivas via vinayakumarb) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java index caeb7a1b79..a38a46c422 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java @@ -31,8 +31,7 @@ import org.apache.hadoop.conf.Configuration; /** Names a file or directory in a {@link FileSystem}. - * Path strings use slash as the directory separator. A path string is - * absolute if it begins with a slash. + * Path strings use slash as the directory separator. */ @Stringable @InterfaceAudience.Public @@ -312,14 +311,7 @@ public boolean isUriPathAbsolute() { return uri.getPath().startsWith(SEPARATOR, start); } - /** True if the path component of this URI is absolute. */ - /** - * There is some ambiguity here. An absolute path is a slash - * relative name without a scheme or an authority. - * So either this method was incorrectly named or its - * implementation is incorrect. This method returns true - * even if there is a scheme and authority. - */ + /** True if the path is not a relative path and starts with root. */ public boolean isAbsolute() { return isUriPathAbsolute(); }