From bc27fce2a42366b92093ad1f276b04d13bf9c372 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sat, 17 Mar 2001 12:41:38 +0000 Subject: [PATCH] Fix for NPE when getClasspath is called before setRmic git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268855 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Rmic.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index d01efad53..2759e2aeb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -366,6 +366,9 @@ public class Rmic extends MatchingTask { String compiler = project.getProperty("build.rmic"); RmicAdapter adapter = RmicAdapterFactory.getRmic(compiler, this ); + + // now we need to populate the compiler adapter + adapter.setRmic( this ); Path classpath = adapter.getClasspath(); loader = new AntClassLoader(project, classpath); @@ -388,9 +391,6 @@ public class Rmic extends MatchingTask { log("RMI Compiling " + fileCount + " class"+ (fileCount > 1 ? "es" : "")+" to " + baseDir, Project.MSG_INFO); - - // now we need to populate the compiler adapter - adapter.setRmic( this ); // finally, lets execute the compiler!! if (!adapter.execute()) {