ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/util FileUtils.java
Date Fri, 04 Feb 2005 16:21:15 GMT
mbenson     2005/02/04 08:21:15

  Modified:    src/main/org/apache/tools/ant/util Tag: ANT_16_BRANCH
                        FileUtils.java
  Log:
  Sync with HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.56.2.10 +8 -9      ant/src/main/org/apache/tools/ant/util/FileUtils.java
  
  Index: FileUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FileUtils.java,v
  retrieving revision 1.56.2.9
  retrieving revision 1.56.2.10
  diff -u -r1.56.2.9 -r1.56.2.10
  --- FileUtils.java	31 Jan 2005 23:50:48 -0000	1.56.2.9
  +++ FileUtils.java	4 Feb 2005 16:21:15 -0000	1.56.2.10
  @@ -709,8 +709,8 @@
       }
   
       /**
  -     * Verifies if the filename represents is an absolute path.
  -     * @param filename the file name to be checked for being an absolute path.
  +     * Verifies that the specified filename represents an absolute path.
  +     * @param filename the filename to be checked.
        * @return true if the filename represents an absolute path.
        */
       public static boolean isAbsolutePath(String filename) {
  @@ -917,15 +917,14 @@
        * java.io.tmpdir used if not specified.
        *
        * @return a File reference to the new temporary file.
  -     * @since ant 1.5
  +     * @since Ant 1.5
        */
       public File createTempFile(String prefix, String suffix, File parentDir) {
  -
           File result = null;
  -        String parent = System.getProperty("java.io.tmpdir");
  -        if (parentDir != null) {
  -            parent = parentDir.getPath();
  -        }
  +        String parent = (parentDir == null)
  +            ? System.getProperty("java.io.tmpdir")
  +            : parentDir.getPath();
  +
           DecimalFormat fmt = new DecimalFormat("#####");
           synchronized (rand) {
               do {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message