When I define only the following constructor : 

<snip>
        /**
         * 
         */
        public MyTask() {
                log("Test");
        }
</snip>



The trace I have is the following :

  BUILD FAILED
  C:\MyProject\spike\SpecialLibraries\XLtoCSV\SpecialBuild.xml:21: Could not 
create type
XLconverter due to java.lang.NullPointerException


but AMOF this "solves" the problem :
<snip>
        /**
         * 
         */
        public XLconverter() {
                this(new Project());            
        }
        
        /**
         * 
         * @param aProject
         */
        public XLconverter(Project aProject) {
                super();
                setProject(aProject);
        }
</snip>


I was only reading page 257 of the O'Reilly book...
I am a bit further now !

\T,


--- Peter Reilly <[EMAIL PROTECTED]> wrote:

> The two init calls issue has been fixed in the ant-core SVN head.
> 
> If you want to use log in a constructor, you can use the (Project p)
> constructor:
> 
> public MyCustomTask (Project project)
> {
> setProject(project);
> System.out.println("Instanciated");
> log("Hello");
> 


--
Any fool can write code that a computer can understand. 
Good programmers write code that humans can understand.
                                                   Martin Fowler 
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@  : [EMAIL PROTECTED]
Do you skype too ... ?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to