diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java index 30ba0f151..6cce50444 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java @@ -229,7 +229,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter { cp.append(bootclasspath); } if (extdirs != null) { - addExtdirsToClasspath(cp); + cp.addExtdirs(extdirs); } cp.append(classpath); cp.append(src); @@ -407,36 +407,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter { } } - /** - * Emulation of extdirs feature in java >= 1.2. - * This method adds all files in the given - * directories (but not in sub-directories!) to the classpath, - * so that you don't have to specify them all one by one. - * @param classpath - Path to append files to - */ - protected void addExtdirsToClasspath(Path classpath) { - if (extdirs == null) { - String extProp = System.getProperty("java.ext.dirs"); - if (extProp != null) { - extdirs = new Path(project, extProp); - } else { - return; - } - } - - String[] dirs = extdirs.list(); - for (int i=0; i= 1.2. - * This method adds all files in the given - * directories (but not in sub-directories!) to the classpath, - * so that you don't have to specify them all one by one. - * @param classpath - Path to append files to - */ - protected void addExtdirsToClasspath(Path classpath) { - Path extdirs = attributes.getExtdirs(); - if (extdirs == null) { - String extProp = System.getProperty("java.ext.dirs"); - if (extProp != null) { - extdirs = new Path(attributes.getProject(), extProp); - } else { - return; - } - } - - String[] dirs = extdirs.list(); - for (int i=0; i= 1.2. + * This method adds all files in the given + * directories (but not in sub-directories!) to the classpath, + * so that you don't have to specify them all one by one. + * @param classpath - Path to append files to + */ + public void addExtdirs(Path extdirs) { + if (extdirs == null) { + String extProp = System.getProperty("java.ext.dirs"); + if (extProp != null) { + extdirs = new Path(project, extProp); + } else { + return; + } + } + + String[] dirs = extdirs.list(); + for (int i=0; i