https://issues.apache.org/bugzilla/show_bug.cgi?id=45916

           Summary: Depend task may remove (inner) classes without source
                    files
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Optional Tasks
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=22647)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22647)
Test case.

The depend task
(src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java) tries not
to delete classes for which it cannot find the source file (Depend.java:481).
When deleting an inner class, it also tries to delete the top-level class
(Depend.java:494 and further). But, in some cases, it deletes an inner classes
without either of these checks (Depend.java:451). As the top-level class may be
preserved, the following javac task may consider the classfile to be
up-to-date, and may not compile the source, leading into a missing classfile
for the inner class after compile.

I am attaching a test case. Unpack the attachment, and execute the
"broken-depend.xml" build script in the "broken-depend" directory (default
target "test-depend"). The execution of the script fails because of a missing
inner-class file.

Tested on ant 1.7.1:
$ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008

NetBeans bug:
http://www.netbeans.org/issues/show_bug.cgi?id=134606


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to