Browse Source

#41422: <junit> in Ant 1.7.0 could throw NPE if no <classpath> was defined.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@498519 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 18 years ago
parent
commit
e15b1d67a0
2 changed files with 7 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java

+ 3
- 0
WHATSNEW View File

@@ -7,6 +7,9 @@ Changes that could break older environments:
Fixed bugs: Fixed bugs:
----------- -----------


* <junit> in Ant 1.7.0 could throw NPE if no <classpath> was defined.
Bugzilla report 41422.

* In Ant 1.7.0, <fileset> in <javadoc> does not by default include only * In Ant 1.7.0, <fileset> in <javadoc> does not by default include only
**/*.java as the documentation claims and earlier revisions did. **/*.java as the documentation claims and earlier revisions did.
Bugzilla report 41264. Bugzilla report 41264.


+ 4
- 1
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -756,7 +756,10 @@ public class JUnitTask extends Task {
if (splitJunit) { if (splitJunit) {
Path path = new Path(getProject()); Path path = new Path(getProject());
path.add(antRuntimeClasses); path.add(antRuntimeClasses);
path.add(getCommandline().getClasspath());
Path extra = getCommandline().getClasspath();
if (extra != null) {
path.add(extra);
}
mirrorLoader = new SplitLoader(myLoader, path); mirrorLoader = new SplitLoader(myLoader, path);
} else { } else {
mirrorLoader = myLoader; mirrorLoader = myLoader;


Loading…
Cancel
Save