cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snazy <...@git.apache.org>
Subject [GitHub] cassandra pull request #236: 9608 trunk
Date Mon, 02 Jul 2018 09:45:31 GMT
Github user snazy commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/236#discussion_r199440701
  
    --- Diff: src/java/org/apache/cassandra/io/util/FileUtils.java ---
    @@ -106,11 +171,57 @@ public static void createHardLink(File from, File to)
             }
         }
     
    +    private static final File tempDir = new File(System.getProperty("java.io.tmpdir"));
    +    private static final AtomicLong tempFileNum = new AtomicLong();
    +
    +    public static File getTempDir()
    +    {
    +        return tempDir;
    +    }
    +
    +    /**
    +     * Pretty much like {@link File#createTempFile(String, String, File)}, but with
    +     * the guarantee that the "random" part of the generated file name between
    +     * {@code prefix} and {@code suffix} is a positive, increasing {@code long} value.
    +     */
         public static File createTempFile(String prefix, String suffix, File directory)
         {
             try
             {
    -            return File.createTempFile(prefix, suffix, directory);
    +            // Do not use java.io.File.createTempFile(), because some tests rely on the
    --- End diff --
    
    Right, I think that's reasonable.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message