ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Piesker" <>
Subject Re: Issue 51829
Date Sat, 19 Nov 2011 16:58:31 GMT
> On 2011-11-17, Stephan Piesker wrote:
>> Idea for solving the issue (51 829).
>> Problem is that an error log is generated, although this is given by the
>> user as optional. The following code:
>> <import optional="true">
>>     <url file="foo.x"/>
>> </ import>
>> The import class first checks whether the file exists from url. And
>> right
>> there is the problem. The method of isExists URLResource class is
>> called,
>> and this in turn uses the connect method of URLResource. In this attempt
>> to open a file and a failure, he said brings the error log. I can
>> believe
>> that you can not just call the connect method in isExists and therefore
>> the solution must sign a modified function. This method then returns
>> true
>> or false.
>> So solution:
>> file line 229:
>> connect away and try to open the file. For failure to return a false and
>> a
>> true success.
> Another solution is to add a parameter to connect that specifies the log
> level to use if connect fails and pass in Project.MSG_VERBOSE from
> inside isExists().  This way you still get the error message when Ant is
> tun in with the -v switch in case you need to diagnose why the import
> fails.
> This is what I have done in trunk by now.

Ah, good solution. On the log level I've never thought of. The idea to
give the user the option of a possible errors in the log look up is very
good. So have no better solution.

>> question:
>> Where should I send the changed file?
> You'd attach it to the Bugzilla issue - if you feel your solution is
> better than mine, let's discuss that and then you can still create one.
>> Should I make a JUnittest this?
> or AntUnit.  Yes, we prefer patches that contain tests as well.
> Stefan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message