On 2009-07-08, Hans Lund <ha.l...@gmail.com> wrote: > I'm not sure if this is a bug, or just works as it should:
depends on who you ask 8-) https://issues.apache.org/bugzilla/show_bug.cgi?id=11143 seems to think we should use the task's classloader instead of the context classloader. > Class.forName('') is the same as > CompilerAdapterFactory.class.getClassLoader().loadClass('') > both will fail or both will succeed. Yes, it is - on paper (or in Javadocs). I vaguely recall problems with some oldish IBM implementations (or Kaffee or ...) where the code made a difference, but this is probably water under the bridge by now. One should never forget that much if not the majority of Ant has been written for Java 1.1 and contains workarounds for the immature VM implementations available at that time. The code in question has been added almost seven years ago <http://svn.apache.org/viewvc?view=rev&revision=273244> but I don't recall the context. > but why not use the Thread.currentThread.getContextClassLoader() > That would lead to the most flexible solution. see above, implementing issue 11143 would probably be even more flexible, Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org