ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40621] - Order of addXand addconfiguredX nested elements
Date Wed, 27 Sep 2006 21:53:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40621>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40621





------- Additional Comments From peterreilly@apache.org  2006-09-27 21:53 -------
It is just that the order is messed up, for example:

public class MyFilters {
   private List list = new ArrayList();
   public void addTrim(Trimer t) { list.add(t); }
   public void addConfiguredUpperCaser(Upper u) { list.add(u);}
   public void addAppend(FileElement z) { list.add(readAll(z));}
   public void setInput(String p) { input = p; }
   public void execute() {for (Object o: list) { input = filter(input, o);} }
}

<myfilters input = "${input}">
   <append file="a.txt"/>
   <uppercaser/>
   <trim/>
</myfilters>

will be in the order with the current code:
  addAppend()
  addTrim()
  setInput()
  addConfiguredUpperCaser()
which will cause the list to be set in an incorrect order.
I propose that the order should be:
  setInput()
  addAppend()
  addConfiguredUpperCaser()
  addTrim()

The mapper example was:

<chainedmapper>
  <mapper type="glob" from="*.bar" to="*.baz"/>
  <globmapper from="*.foo" to="*.bar"/>
</chainedmapper>

The addGlobmapper() was called first and then the addConfiguredMapper()
was called.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message