ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r677352 - /ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java
Date Wed, 16 Jul 2008 17:23:26 GMT
Author: mbenson
Date: Wed Jul 16 10:23:25 2008
New Revision: 677352

URL: http://svn.apache.org/viewvc?rev=677352&view=rev
Log:
convenience constructor

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java?rev=677352&r1=677351&r2=677352&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java Wed Jul
16 10:23:25 2008
@@ -70,14 +70,24 @@
     }
 
     /**
+     * Create a new FileResource.
+     * @param p Project
+     * @param f File represented
+     * @since Ant 1.8
+     */
+    public FileResource(Project p, File f) {
+        setProject(p);
+        setFile(f);
+    }
+
+    /**
      * Constructor for Ant attribute introspection.
      * @param p the Project against which to resolve <code>s</code>.
      * @param s the absolute or Project-relative filename as a String.
      * @see org.apache.tools.ant.IntrospectionHelper
      */
     public FileResource(Project p, String s) {
-        this(p.resolveFile(s));
-        setProject(p);
+        this(p, p.resolveFile(s));
     }
 
     /**



Mime
View raw message