ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "NIkhil R. Deshpande" <>
Subject [BUG] NullPointerException while Deleting a directory.
Date Wed, 13 Dec 2000 12:05:38 GMT
I apologize if this has been already reported. But could
not find anything on this when searched the bug report
Tried to submit this bug through BugRat, but when I tried
to view this report online, the text for 'How to reproduce'
was missing. So mailing this to ant-dev.

With regards,


Report ID = 587 
class: swbug
Project release: Ant 1.2
JVM Release: Sun JDK1.1.8
OS: Solaris
OS Release: 2.7
Platform: Sparc

Report Synopsis:
NullPointerException while Deleting a directory.

Report Description:

On an Unix platform,
When the directory cannot be deleted by the delete task,
ant throws a NullPointerException (for a particular case):

Stack trace:
nikhild@localhost:~/src/TEST>ant clean
Searching for build.xml ...
Buildfile: /home/nikhild/src/TEST/build.xml

   [delete] Deleting directory /home/nikhild/src/TEST/lib/classes


        at Code)
        at Code)
        at Code)
        at Code)
        at Code)
        at Code)
        at Code)
        at Code)

Total time: 0 seconds

How To Reproduce:
Stumbled upon this when did a build by root user and then
clean by a non-root user.

Lets take the ${build.classes} directory as the guinea pig.
1. Create the ${build.classes} directory by hand
   say mkdir lib/classes (if not already exits).

2. Change it's access permissions to 000
   say chmod 000 lib/classes/
   (Or change the owner of the directory say to root)

3. Now run ant clean (assuming the clean target has a task
   to delete ${build.classes}

And this results in a NullPointerException.

View raw message