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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]