hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8975) TestFileContextResolveAfs fails on Windows
Date Mon, 05 Nov 2012 22:16:14 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490980#comment-13490980
] 

Brandon Li commented on HADOOP-8975:
------------------------------------

Sorry of the late reply.
The change of method isAbsolute() and isUriPathAbsolute() was added in JIRA HADOOP-4952.
{noformat}
 
+  /**
+   *  True if the path component (i.e. directory) of this URI is absolute.
+   */
+  public boolean isUriPathAbsolute() {
+    int start = hasWindowsDrive(uri.getPath(), true) ? 3 : 0;
+    return uri.getPath().startsWith(SEPARATOR, start);
+   }
+  
   /** True if the directory of this path 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.
+   */
   public boolean isAbsolute() {
-    int start = hasWindowsDrive(uri.getPath(), true) ? 3 : 0;
-    return uri.getPath().startsWith(SEPARATOR, start);
+     return isUriPathAbsolute();
   }
{noformat}

I guess the change was made to highlight the true method functionality, so the author made
a new method isUriPathAbsolute() and added comments to isAbsolute(). However, the isAbsolute()
was not removed since it might be out of the scope of that JIRA.

+1 to the new patch.

                
> TestFileContextResolveAfs fails on Windows
> ------------------------------------------
>
>                 Key: HADOOP-8975
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8975
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: trunk-win
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HADOOP-8975-branch-trunk-win.patch, HADOOP-8975-branch-trunk-win.patch
>
>
> This appears to be a Windows-specific path parsing issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message