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

Steve Loughran commented on HADOOP-13591:
-----------------------------------------

I'm =0 on making "/" a constant, as I don't see anyone ever changing it. What 
probably makes more sense is to factor out the repeated operation. From S3aFS

{code}
  /**
   * Turns a path (relative or otherwise) into an S3 key, adding a trailing
   * "/" if the path is not the root <i>and</i> does not already have a "/"
   * at the end.
   *
   * @param key s3 key or ""
   * @return the with a trailing "/", or, if it is the root key, "",
   */
  private String maybeAddTrailingSlash(String key) {
    if (!key.isEmpty() && !key.endsWith("/")) {
      return key + '/';
    } else {
      return key;
    }
  }
{code}

+can you stop your IDE automatically converting imports to .* ? It complicates 
merging and may create conflicts now that there's a {{java.io.FileSystem}} in 
Java7+.  

> Unit test failed in 'TestOSSContractGetFileStatus' and 
> 'TestOSSContractRootDir'
> -------------------------------------------------------------------------------
>
>                 Key: HADOOP-13591
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13591
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: HADOOP-12756
>            Reporter: Genmao Yu
>            Assignee: Genmao Yu
>             Fix For: HADOOP-12756
>
>         Attachments: HADOOP-13591-HADOOP-12756.001.patch, 
> HADOOP-13591-HADOOP-12756.002.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to