2014/1/22 Mark Thomas <ma...@apache.org> > I thought about that. There is some coupling between the entry and > exit methods (the class loader) that the caller would need to retain > and some standard try/finally plumbing. > > There is also an optimisation not to try to change the class loader if > there is no need to do so. >
That looks like a good summary ! > > In an effort to reduce this common code for every caller, I started > down a different route. I do wonder if the entry/exit approach might > end up being cleaner as even with my approach, you end up with some > not so nice exception handling. > > I'll see what folks think of the patch so far and maybe explore the > entry/exit option as well. > > The first patch however looks more complicated than the "dumb" way IMO. Rémy