Github user aajisaka commented on a diff in the pull request:

    https://github.com/apache/hadoop/pull/89#discussion_r58492524
  
    --- Diff: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
 ---
    @@ -55,9 +56,11 @@
     public class TestFileUtil {
       private static final Log LOG = LogFactory.getLog(TestFileUtil.class);
     
    -  private static final String TEST_ROOT_DIR = System.getProperty(
    -      "test.build.data", "/tmp") + "/fu";
    +  private static final String TEST_ROOT_DIR =
    +      new File(GenericTestUtils.getTestDir(), "fu").getAbsolutePath();
       private static final File TEST_DIR = new File(TEST_ROOT_DIR);
    +  private static final String  cacheDir = 
System.getProperty("test.cache.data",
    +      new File(TEST_DIR, "cache").getAbsolutePath());
    --- End diff --
    
    * The code creates String by `File.getAbsolutePath()` and then creates File 
by `new File(String)`. It can be simplified by the following and 
`TEST_ROOT_DIR` can be removed.
    ```
     private static final File TEST_DIR = new 
File(GenericTestUtils.getTestDir(), "fu");
    ```
    
    * `cacheDir` is unused.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to