ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Cuprak <507...@corpmail.kodak.com>
Subject RE: Bug in Ant? - More information (examined source and modified)
Date Fri, 04 Oct 2002 18:44:44 GMT

Trying to track down this problem, I modified Target.java with 
System.err statements to check variable types. Basically, if I run the 
task directly, o is an instance of Task but if I run utilities-build 
via antcall, my AntTask is no longer a 'Task' but a 
RuntimeConfigurable.  Does anyone have any insights as to why my task 
becomes typed differently depending on whether antcall is used versus 
directly running the task?

 -Ryan
(Target.java)
public void execute() throws BuildException {
        if (testIfCondition() && testUnlessCondition()) {
            Enumeration enum = children.elements();
            while (enum.hasMoreElements()) {
                Object o = enum.nextElement();
                System.err.println ( "O: " + o );
                if (o instanceof Task) {
                    System.err.println ( "is a task." );
                    Task task = (Task) o;
                    task.perform();
                } else {
                    System.err.println ( "is not a task." );
                    RuntimeConfigurable r = (RuntimeConfigurable) o;
                    r.maybeConfigure(project);
                }
            }
        } else if (!testIfCondition()) {
            project.log(this, "Skipped because property '" + 
this.ifCondition
                + "' not set.", Project.MSG_VERBOSE);
        } else {
            project.log(this, "Skipped because property '"
                + this.unlessCondition + "' set.", Project.MSG_VERBOSE);
        }
    }


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message