You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Adam Murdoch <ad...@yahoo.com> on 2001/12/30 01:01:33 UTC
[PATCH] build listener class loading
Hi,
This patch fixes an odd class loading problem, where the classes used by a
BuildListener's buildFinished() method cannot be loaded. This is how the
problem happens:
- The task is loaded via an AntClassLoader (e.g. using <taskdef> with a
classpath specified).
- The AntClassLoader adds a BuildListener to the project, so that it can
clean up when the build finishes.
- When the task executes, it adds a BuildListener to its project.
- The build finishes, and a build finished event is fired.
- The AntClassLoader's buildFinished() method is called. The class loader
cleans itself up.
- The task's buildFinished() method is called. If this method uses classes
which have not been loaded, the AntClassLoader's findClass() method is
called.
- The AntClassLoader is in an unusable state, and a NPE is thrown.
This patch defers AntClassLoader (and IntrospectionHelper) cleanup until
after the build finished event has been handled by all build listeners.
Adam
RE: [PATCH] build listener class loading
Posted by Adam Murdoch <ad...@yahoo.com>.
> -----Original Message-----
> From: Magesh Umasankar [mailto:umagesh@apache.org]
> Sent: Friday, 8 February 2002 5:57 AM
> To: Ant Developers List
> Subject: Re: [PATCH] build listener class loading
>
>
> From: "Adam Murdoch" <ad...@yahoo.com>
>
> Adam:
>
> >
> > This patch fixes an odd class loading problem,
> > where the classes used by a BuildListener's
> > buildFinished() method cannot be loaded.
>
> I suppose you will be applying this patch
> by yourself, now that you have the necessary
> karma? I haven't seen anything discussed
> that would veto this patch.
>
Yep, I will.
Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [PATCH] build listener class loading
Posted by Magesh Umasankar <um...@apache.org>.
From: "Adam Murdoch" <ad...@yahoo.com>
Adam:
>
> This patch fixes an odd class loading problem,
> where the classes used by a BuildListener's
> buildFinished() method cannot be loaded.
I suppose you will be applying this patch
by yourself, now that you have the necessary
karma? I haven't seen anything discussed
that would veto this patch.
Cheers,
Magesh
**********************************************
* Philosopher: A fool who torments himself *
* during life, to be spoken of when dead. *
**********************************************
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>