You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by an...@apache.org on 2006/10/30 03:53:21 UTC

svn commit: r469050 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Path.java

Author: antoine
Date: Sun Oct 29 18:53:20 2006
New Revision: 469050

URL: http://svn.apache.org/viewvc?view=rev&rev=469050
Log:
fix for 
<javac> fails with NPE when compiling with eclipse ecj 3.1.x
Bugzilla 40839.
root cause of the problem was in org.eclipse.jdt.core.JDTCompiler
method addExtDirs. A FileSet was created without the Project attribute set,
then added to a Path.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=469050&r1=469049&r2=469050
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Sun Oct 29 18:53:20 2006
@@ -16,6 +16,9 @@
 * behavior change of DirectoryScanner/AbstractFileset when conditional include
   patterns are used. Bugzilla 40722.
 
+* <javac> fails with NPE when compiling with eclipse ecj 3.1.x.
+  Bugzilla 40839.
+  
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?view=diff&rev=469050&r1=469049&r2=469050
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java Sun Oct 29 18:53:20 2006
@@ -201,6 +201,9 @@
      * @throws BuildException on error
      */
     public void addFileset(FileSet fs) throws BuildException {
+        if (fs.getProject() == null) {
+            fs.setProject(getProject());
+        }
         add(fs);
     }
 
@@ -210,6 +213,9 @@
      * @throws BuildException on error
      */
     public void addFilelist(FileList fl) throws BuildException {
+        if (fl.getProject() == null) {
+            fl.setProject(getProject());
+        }
         add(fl);
     }
 
@@ -219,6 +225,9 @@
      * @throws BuildException on error
      */
     public void addDirset(DirSet dset) throws BuildException {
+        if (dset.getProject() == null) {
+            dset.setProject(getProject());
+        }
         add(dset);
     }
 
@@ -229,6 +238,9 @@
      * @since Ant 1.6
      */
     public void add(Path path) throws BuildException {
+        if (path.getProject() == null) {
+            path.setProject(getProject());
+        }
         add((ResourceCollection) path);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org