ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <>
Subject Re: FileSet with copy fails with NPE..
Date Wed, 10 Dec 2008 14:51:12 GMT

Hi Mark,

Thank you for quick reply.. I saw that listed in forum and thought I need to
set the project fileset..
However, the issue was to set project for copy taks it self.

To Ant Dev Team,

It was 3 hours of wasted time to figure this out.. 

Simple copy without fileset usage works fine without setting the project and
fails only when the fileset is added to copy task.

The actual cause with line 431 of

                        ds = fs.getDirectoryScanner(getProject());

Which inturn results in NPE in FileSet NPE during log at line 477 in

 p.log(getDataTypeName() + ": Setup scanner in dir " + dir
            + " with " + ps, Project.MSG_DEBUG);

In future, it would be nice if ant could do one or more of the following
changes in all such places, where it depends of project value should not be

1. Make sure proper asserts are done for getProject() method if it should
not be null at all
2. Or focus on Methods which depend on non null value of getProject() and 
should throw proper exception
3. AbstractFileSet could use getProject() of its own task rather than
depending on the parameter passed to it. Not sure, why the project is passed
as parameter..(may be I don't understand the need due to my currrent limited

Raja Nagendra Kumar,
-A Competent Java Specialized Product Development Team. 

View this message in context:
Sent from the Ant - Dev mailing list archive at

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

View raw message