You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Binglin Chang (JIRA)" <ji...@apache.org> on 2013/08/22 18:20:55 UTC

[jira] [Created] (HADOOP-9897) Add method to get path start position without drive specifier in o.a.h.fs.Path

Binglin Chang created HADOOP-9897:
-------------------------------------

             Summary: Add method to get path start position without drive specifier in o.a.h.fs.Path  
                 Key: HADOOP-9897
                 URL: https://issues.apache.org/jira/browse/HADOOP-9897
             Project: Hadoop Common
          Issue Type: Improvement
            Reporter: Binglin Chang
            Assignee: Binglin Chang
            Priority: Trivial


There are a lot of code in Path to get start position after skipping drive specifier, like:

{code}
    int start = hasWindowsDrive(uri.getPath()) ? 3 : 0;
{code}

First, using hard coded 3 or 0 is bad, second, the code always assumes path is with "/" prefix.


--
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