ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util FileUtils.java
Date Mon, 26 Nov 2001 11:03:52 GMT
bodewig     01/11/26 03:03:52

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/javacc
                        JJTree.java JavaCC.java
               src/main/org/apache/tools/ant/util FileUtils.java
  Log:
  JDK 1.1 compatibility.
  
  Submitted by:	Finn Bock <bckfnn@worldonline.dk>
  
  Revision  Changes    Path
  1.6       +1 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
  
  Index: JJTree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JJTree.java	2001/10/28 21:30:21	1.5
  +++ JJTree.java	2001/11/26 11:03:52	1.6
  @@ -202,6 +202,7 @@
           final Path classpath = cmdl.createClasspath(project);
           classpath.createPathElement().setPath(javaccHome.getAbsolutePath() +
                                                     "/JavaCC.zip");
  +        classpath.addJavaRuntime();
   
           final Commandline.Argument arg = cmdl.createVmArgument();
           arg.setValue("-mx140M");
  
  
  
  1.10      +1 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
  
  Index: JavaCC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JavaCC.java	2001/10/28 21:30:21	1.9
  +++ JavaCC.java	2001/11/26 11:03:52	1.10
  @@ -245,6 +245,7 @@
           final Path classpath = cmdl.createClasspath(project);
           classpath.createPathElement().setPath(javaccHome.getAbsolutePath() +
                                                     "/JavaCC.zip");
  +        classpath.addJavaRuntime();
   
           final Commandline.Argument arg = cmdl.createVmArgument();
           arg.setValue("-mx140M");
  
  
  
  1.11      +6 -2      jakarta-ant/src/main/org/apache/tools/ant/util/FileUtils.java
  
  Index: FileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/FileUtils.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FileUtils.java	2001/11/19 14:15:43	1.10
  +++ FileUtils.java	2001/11/26 11:03:52	1.11
  @@ -85,7 +85,7 @@
    * @author <a href="mailto:conor@apache.org">Conor MacNeill</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
    *
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
    */
    
   public class FileUtils {
  @@ -496,10 +496,14 @@
       public File createTempFile(String prefix, String suffix, File parentDir) {
   
           File result = null;
  +        String parent = null;
  +        if (parentDir != null) {
  +            parent = parentDir.getPath();
  +        }
           DecimalFormat fmt = new DecimalFormat("#####");
           synchronized (rand) {
               do {
  -                result = new File(parentDir, 
  +                result = new File(parent, 
                                     prefix + fmt.format(rand.nextInt()) 
                                     + suffix);
               } while (result.exists());
  
  
  

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


Mime
View raw message