ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r417126 - in /ant/core/trunk/src/main/org/apache/tools/ant: Project.java taskdefs/AbstractJarSignerTask.java taskdefs/ExecTask.java taskdefs/Javac.java taskdefs/Javadoc.java taskdefs/TempFile.java taskdefs/Touch.java taskdefs/XSLTProcess.java
Date Mon, 26 Jun 2006 05:15:36 GMT
Author: kevj
Date: Sun Jun 25 22:15:35 2006
New Revision: 417126

URL: http://svn.apache.org/viewvc?rev=417126&view=rev
Log:
roll back deprecation of Project.resolveFile, revert prior changes to code

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/Project.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Project.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Project.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Project.java Sun Jun 25 22:15:35 2006
@@ -1339,9 +1339,6 @@
      *
      * @return the resolved File.
      *
-     * @deprecated since 1.7 
-     *             Use @see {FileUtils#resolveFile FileUtils.resolveFile} 
-     *             instead.
      */
     public File resolveFile(String fileName) {
         return FILE_UTILS.resolveFile(baseDir, fileName);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java Sun Jun
25 22:15:35 2006
@@ -27,7 +27,6 @@
 import org.apache.tools.ant.types.FileSet;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.RedirectorElement;
-import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.JavaEnvUtils;
 
 /**
@@ -98,8 +97,6 @@
      * @since Ant 1.7
      */
     private Path path = null;
-
-    private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
     
     /**
      * Set the maximum memory to be used by the jarsigner process
@@ -290,7 +287,7 @@
             // is the keystore a file
             addValue(cmd,"-keystore");
             String loc;
-            File keystoreFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), keystore);
+            File keystoreFile = getProject().resolveFile(keystore);
             if (keystoreFile.exists()) {
                 loc = keystoreFile.getPath();
             } else {

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java Sun Jun 25 22:15:35
2006
@@ -412,7 +412,7 @@
             return exec;
         }
         // try to find the executable
-        File executableFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), exec);
+        File executableFile = getProject().resolveFile(exec);
         if (executableFile.exists()) {
             return executableFile.getAbsolutePath();
         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java Sun Jun 25 22:15:35 2006
@@ -111,8 +111,6 @@
     private String source;
     private String debugLevel;
     private File tmpDir;
-    
-    private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
 
     /**
      * Javac task for compilation of Java files.
@@ -804,7 +802,7 @@
         // compile lists
         String[] list = src.list();
         for (int i = 0; i < list.length; i++) {
-            File srcDir = FILE_UTILS.resolveFile(getProject().getBaseDir(), list[i]);
+            File srcDir = getProject().resolveFile(list[i]);
             if (!srcDir.exists()) {
                 throw new BuildException("srcdir \""
                                          + srcDir.getPath()

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Sun Jun 25 22:15:35
2006
@@ -543,7 +543,7 @@
         while (tok.hasMoreTokens()) {
             String f = tok.nextToken();
             SourceFile sf = new SourceFile();
-            sf.setFile(FILE_UTILS.resolveFile(getProject().getBaseDir(),f.trim()));
+            sf.setFile(getProject().resolveFile(f.trim()));
             addSource(sf);
         }
     }
@@ -1016,7 +1016,7 @@
         if (!tok.hasMoreTokens()) {
             throw new BuildException(linkOfflineError);
         }
-        le.setPackagelistLoc(FILE_UTILS.resolveFile(getProject().getBaseDir(),tok.nextToken()));
+        le.setPackagelistLoc(getProject().resolveFile(tok.nextToken()));
     }
 
     /**
@@ -1745,7 +1745,7 @@
                 String link = null;
                 if (la.shouldResolveLink()) {
                     File hrefAsFile = 
-                        FILE_UTILS.resolveFile(getProject().getBaseDir(), la.getHref());
+                        getProject().resolveFile(la.getHref());
                     if (hrefAsFile.exists()) {
                         try {
                             link = FILE_UTILS.getFileURL(hrefAsFile)

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java Sun Jun 25 22:15:35
2006
@@ -133,7 +133,7 @@
             throw new BuildException("no property specified");
         }
         if (destDir == null) {
-            destDir = FILE_UTILS.resolveFile(getProject().getBaseDir(),".");
+            destDir = getProject().resolveFile(".");
         }
         File tfile = FILE_UTILS.createTempFile(
                 prefix, suffix, destDir, deleteOnExit);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java Sun Jun 25 22:15:35 2006
@@ -341,7 +341,7 @@
                 long modTime = (r.isExists()) ? r.getLastModified()
                     : defaultTimestamp;
                 for (int i = 0; i < mapped.length; i++) {
-                    touch(FILE_UTILS.resolveFile(getProject().getBaseDir(),mapped[i]), modTime);
+                    touch(getProject().resolveFile(mapped[i]), modTime);
                 }
             }
         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java?rev=417126&r1=417125&r2=417126&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java Sun Jun 25 22:15:35
2006
@@ -274,7 +274,7 @@
 
         try {
             if (baseDir == null) {
-                baseDir = FILE_UTILS.resolveFile(getProject().getBaseDir(),".");
+                baseDir = getProject().resolveFile(".");
             }
 
             liaison = getLiaison();
@@ -289,7 +289,7 @@
             if (xslFile != null) {
                 // If we enter here, it means that the stylesheet is supplied
                 // via style attribute
-                File stylesheet = FILE_UTILS.resolveFile(getProject().getBaseDir(), xslFile);
+                File stylesheet = getProject().resolveFile(xslFile);
                 if (!stylesheet.exists()) {
                     stylesheet = FILE_UTILS.resolveFile(baseDir, xslFile);
                     /*



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


Mime
View raw message