Browse Source

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.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@469050 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 18 years ago
parent
commit
873b850f39
2 changed files with 15 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +12
    -0
      src/main/org/apache/tools/ant/types/Path.java

+ 3
- 0
WHATSNEW View File

@@ -16,6 +16,9 @@ Fixed bugs:
* 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:
--------------



+ 12
- 0
src/main/org/apache/tools/ant/types/Path.java View File

@@ -201,6 +201,9 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
* @throws BuildException on error
*/
public void addFileset(FileSet fs) throws BuildException {
if (fs.getProject() == null) {
fs.setProject(getProject());
}
add(fs);
}

@@ -210,6 +213,9 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
* @throws BuildException on error
*/
public void addFilelist(FileList fl) throws BuildException {
if (fl.getProject() == null) {
fl.setProject(getProject());
}
add(fl);
}

@@ -219,6 +225,9 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
* @throws BuildException on error
*/
public void addDirset(DirSet dset) throws BuildException {
if (dset.getProject() == null) {
dset.setProject(getProject());
}
add(dset);
}

@@ -229,6 +238,9 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
* @since Ant 1.6
*/
public void add(Path path) throws BuildException {
if (path.getProject() == null) {
path.setProject(getProject());
}
add((ResourceCollection) path);
}



Loading…
Cancel
Save