ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Junit assertions
Date Mon, 19 Apr 2004 16:17:22 GMT
OK, I see the problem:

In CommandlineJava#addCommandsToList(ListIterator) we have

        //now any assertions are added
        if (getAssertions() != null) {
            getAssertions().applyAssertions(this);
        }

this adds VmArgs to the CommandlineJava instance for the configured
assertions.  It does so each time CommandlineJava#addCommandsToList is
invoked - thus adding new arguments for each invocation.

This method is invoked while the command line is being processed - and
the snippet above comes after the VM arguments have been processed
already.  So it is coming too late in the first invocation and
everything after the second invocation gets redundant arguments.

I assume the code above wanted to invoke Assertions#applyAssertions(List)
inestead of Assertions#applyAssertions(CommandlineJava).  Well, it
probably wanted to invoke Assertions#applyAssertions(ListIterator) if
there was such a method.

Stefan

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


Mime
View raw message