You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2006/12/11 23:36:07 UTC

svn commit: r485926 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Path.java src/tests/antunit/types/resources/latepath-test.xml

Author: mbenson
Date: Mon Dec 11 14:36:06 2006
New Revision: 485926

URL: http://svn.apache.org/viewvc?view=rev&rev=485926
Log:
Regression: <path> was evaluating nested content only once, so that it could
not e.g. pick up files that didn't exist the first time through.
Bugzilla 41151.

Added:
    ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml   (with props)
Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=485926&r1=485925&r2=485926
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Dec 11 14:36:06 2006
@@ -42,8 +42,11 @@
 * XmlProperty overrides previously set property value when handling duplicate 
   elements. Bugzilla 41080.
 
-* Having many tasks causes OOM.
-  Bugzilla 41049.
+* Having many tasks causes OOM.  Bugzilla 41049.
+
+* Regression: <path> was evaluating nested content only once, so that it could
+  not e.g. pick up files that didn't exist the first time through.
+  Bugzilla 41151.
 
 Other changes:
 --------------

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?view=diff&rev=485926&r1=485925&r2=485926
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java Mon Dec 11 14:36:06 2006
@@ -277,6 +277,7 @@
         if (union == null) {
             union = new Union();
             union.setProject(getProject());
+            union.setCache(false);
         }
         union.add(c);
         setChecked(false);

Added: ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml?view=auto&rev=485926
==============================================================================
--- ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml (added)
+++ ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml Mon Dec 11 14:36:06 2006
@@ -0,0 +1,17 @@
+<project xmlns:au="antlib:org.apache.ant.antunit">
+
+  <target name="testLatePath" depends="tearDown">
+    <path id="p">
+      <fileset file="testLatePath" />
+    </path>
+    <pathconvert refid="p" />
+    <touch file="testLatePath" />
+    <au:assertTrue>
+      <resourcecount when="eq" count="1" refid="p" />
+    </au:assertTrue>
+  </target>
+
+  <target name="tearDown">
+    <delete file="testLatePath" />
+  </target>
+</project>

Propchange: ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native



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


Re: svn commit: r485926 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Path.java src/tests/antunit/types/resources/latepath-test.xml

Posted by Matt Benson <gu...@yahoo.com>.
--- Peter Reilly <pe...@gmail.com> wrote:

> Should the cache attribute of
> BaseResourceCollectionContainer not
> be defaulted to false. I fear that there may be
> other similar cases -
> id a collection, print a collection, change the
> collection, use the collection.

Maybe it should default to false.  IIRC my original
thought was that caching would yield better
performance, so we could try it and see whether
enabling by default hurt more than it helped.

-Matt

> 
> Index:
>
src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
>
===================================================================
> ---
>
src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
>  (revision 485230)
> +++
>
src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
>  (working copy)
> @@ -38,7 +38,7 @@
>      extends DataType implements ResourceCollection,
> Cloneable {
>      private List rc = new ArrayList();
>      private Collection coll = null;
> -    private boolean cache = true;
> +    private boolean cache = false;
> 
>      /**
>       * Set whether to cache collections.
> 
> Peter
> On 12/11/06, mbenson@apache.org <mb...@apache.org>
> wrote:
> > Author: mbenson
> > Date: Mon Dec 11 14:36:06 2006
> > New Revision: 485926
> >
> > URL:
> http://svn.apache.org/viewvc?view=rev&rev=485926
> > Log:
> > Regression: <path> was evaluating nested content
> only once, so that it could
> > not e.g. pick up files that didn't exist the first
> time through.
> > Bugzilla 41151.
> >
> > Added:
> >    
>
ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
>   (with props)
> > Modified:
> >     ant/core/trunk/WHATSNEW
> >    
>
ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
> >
> > Modified: ant/core/trunk/WHATSNEW
> > URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=485926&r1=485925&r2=485926
> >
>
==============================================================================
> > --- ant/core/trunk/WHATSNEW (original)
> > +++ ant/core/trunk/WHATSNEW Mon Dec 11 14:36:06
> 2006
> > @@ -42,8 +42,11 @@
> >  * XmlProperty overrides previously set property
> value when handling duplicate
> >    elements. Bugzilla 41080.
> >
> > -* Having many tasks causes OOM.
> > -  Bugzilla 41049.
> > +* Having many tasks causes OOM.  Bugzilla 41049.
> > +
> > +* Regression: <path> was evaluating nested
> content only once, so that it could
> > +  not e.g. pick up files that didn't exist the
> first time through.
> > +  Bugzilla 41151.
> >
> >  Other changes:
> >  --------------
> >
> > Modified:
>
ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
> > URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?view=diff&rev=485926&r1=485925&r2=485926
> >
>
==============================================================================
> > ---
>
ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
> (original)
> > +++
>
ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
> Mon Dec 11 14:36:06 2006
> > @@ -277,6 +277,7 @@
> >          if (union == null) {
> >              union = new Union();
> >              union.setProject(getProject());
> > +            union.setCache(false);
> >          }
> >          union.add(c);
> >          setChecked(false);
> >
> > Added:
>
ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
> > URL:
>
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml?view=auto&rev=485926
> >
>
==============================================================================
> > ---
>
ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
> (added)
> > +++
>
ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
> Mon Dec 11 14:36:06 2006
> > @@ -0,0 +1,17 @@
> > +<project
> xmlns:au="antlib:org.apache.ant.antunit">
> > +
> > +  <target name="testLatePath" depends="tearDown">
> > +    <path id="p">
> > +      <fileset file="testLatePath" />
> > +    </path>
> > +    <pathconvert refid="p" />
> > +    <touch file="testLatePath" />
> > +    <au:assertTrue>
> > +      <resourcecount when="eq" count="1"
> refid="p" />
> > +    </au:assertTrue>
> > +  </target>
> > +
> > +  <target name="tearDown">
> > +    <delete file="testLatePath" />
> > +  </target>
> > +</project>
> >
> > Propchange:
>
ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
> >
>
------------------------------------------------------------------------------
> >     svn:eol-style = native
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> dev-help@ant.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

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


Re: svn commit: r485926 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Path.java src/tests/antunit/types/resources/latepath-test.xml

Posted by Peter Reilly <pe...@gmail.com>.
Should the cache attribute of BaseResourceCollectionContainer not
be defaulted to false. I fear that there may be other similar cases -
id a collection, print a collection, change the collection, use the collection.

Index: src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
===================================================================
--- src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
 (revision 485230)
+++ src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
 (working copy)
@@ -38,7 +38,7 @@
     extends DataType implements ResourceCollection, Cloneable {
     private List rc = new ArrayList();
     private Collection coll = null;
-    private boolean cache = true;
+    private boolean cache = false;

     /**
      * Set whether to cache collections.

Peter
On 12/11/06, mbenson@apache.org <mb...@apache.org> wrote:
> Author: mbenson
> Date: Mon Dec 11 14:36:06 2006
> New Revision: 485926
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=485926
> Log:
> Regression: <path> was evaluating nested content only once, so that it could
> not e.g. pick up files that didn't exist the first time through.
> Bugzilla 41151.
>
> Added:
>     ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml   (with props)
> Modified:
>     ant/core/trunk/WHATSNEW
>     ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
>
> Modified: ant/core/trunk/WHATSNEW
> URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=485926&r1=485925&r2=485926
> ==============================================================================
> --- ant/core/trunk/WHATSNEW (original)
> +++ ant/core/trunk/WHATSNEW Mon Dec 11 14:36:06 2006
> @@ -42,8 +42,11 @@
>  * XmlProperty overrides previously set property value when handling duplicate
>    elements. Bugzilla 41080.
>
> -* Having many tasks causes OOM.
> -  Bugzilla 41049.
> +* Having many tasks causes OOM.  Bugzilla 41049.
> +
> +* Regression: <path> was evaluating nested content only once, so that it could
> +  not e.g. pick up files that didn't exist the first time through.
> +  Bugzilla 41151.
>
>  Other changes:
>  --------------
>
> Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
> URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?view=diff&rev=485926&r1=485925&r2=485926
> ==============================================================================
> --- ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java (original)
> +++ ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java Mon Dec 11 14:36:06 2006
> @@ -277,6 +277,7 @@
>          if (union == null) {
>              union = new Union();
>              union.setProject(getProject());
> +            union.setCache(false);
>          }
>          union.add(c);
>          setChecked(false);
>
> Added: ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
> URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml?view=auto&rev=485926
> ==============================================================================
> --- ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml (added)
> +++ ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml Mon Dec 11 14:36:06 2006
> @@ -0,0 +1,17 @@
> +<project xmlns:au="antlib:org.apache.ant.antunit">
> +
> +  <target name="testLatePath" depends="tearDown">
> +    <path id="p">
> +      <fileset file="testLatePath" />
> +    </path>
> +    <pathconvert refid="p" />
> +    <touch file="testLatePath" />
> +    <au:assertTrue>
> +      <resourcecount when="eq" count="1" refid="p" />
> +    </au:assertTrue>
> +  </target>
> +
> +  <target name="tearDown">
> +    <delete file="testLatePath" />
> +  </target>
> +</project>
>
> Propchange: ant/core/trunk/src/tests/antunit/types/resources/latepath-test.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

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