ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: AW: strange logging error
Date Wed, 24 Aug 2005 06:23:05 GMT
The ProjectHelper2 [1] tries setting a reference to the project instance at line 925. But only
for the placeholder UnkownElement. In line 951 that is replaced by the wrapper [2].

Conor had writte an article [3] about that whole scenario.

Just an idea - implement:
    Project project;
    public void setProject(Project p) { project = p; }
    public void getProject() { return project; }
    public void log(String msg) { getProject().log(msg); }
If I remember right, the reflection stuff during the initialization would set the reference
then and
you could log directly via the project instance.




>-----Urspr├╝ngliche Nachricht-----
>Von: Kev Jackson [] 
>Gesendet: Mittwoch, 24. August 2005 05:07
>An: Ant Developers List
>Betreff: Re: AW: strange logging error
> wrote:
>>Maybe the project is not set correctly.
>>What does "getProject()" refer?
>>If you inherit from DispatchUtils, you dont have a real task 
>(class inherited from oata.Task).
>>You┬┤re using a task wrapper instead.
>I know, but I was inheriting from Task (just indirectly).  As 
>soon as I directly inherited from Task, the log worked.  So:
>Task -> AbstractDarcs -> Initialize.execute (null pointer 
>exception) Task -> Initialize.execute (no problems)
>is this the correct behaviour for Ant?  Should my initial 
>version have been using DispatchUtils?  As I've programmed 
>round it and solved the problem I was having, it's not a 
>biggy, but I'm interested in why this is so.
>To unsubscribe, e-mail: For 
>additional commands, e-mail:

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

View raw message