Browse Source

only add classpath elements to existing loaders, not to a freshly created one. PR 45847.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@698943 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
e0d63af0cb
3 changed files with 8 additions and 1 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +4
    -0
      contributors.xml
  3. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/Classloader.java

+ 1
- 0
CONTRIBUTORS View File

@@ -236,6 +236,7 @@ Ray Waldin
Richard Evans
Rick Beton
Robert Anderson
Robert Flaherty
Robert Shaw
Robert Watkins
Roberto Scaramuzzi


+ 4
- 0
contributors.xml View File

@@ -960,6 +960,10 @@
<first>Robert</first>
<last>Anderson</last>
</name>
<name>
<first>Robert</first>
<last>Flaherty</last>
</name>
<name>
<first>Robert</first>
<last>Shaw</last>


+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/Classloader.java View File

@@ -185,6 +185,7 @@ public class Classloader extends Task {
}

AntClassLoader acl = (AntClassLoader) obj;
boolean existingLoader = acl != null;

if (acl == null) {
// Construct a new class loader
@@ -220,7 +221,8 @@ public class Classloader extends Task {
getProject().setCoreLoader(acl);
}
}
if (classpath != null) {

if (existingLoader && classpath != null) {
String[] list = classpath.list();
for (int i = 0; i < list.length; i++) {
File f = new File(list[i]);


Loading…
Cancel
Save