ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Problem with ANT classloader?
Date Sun, 19 May 2002 10:29:40 GMT
On Sat, 18 May 2002 06:08, Ara Abrahamian wrote:
> <problem-with-getProtectionDomain/etc-1.1/1.2>
> The correct approach is for ant's classloader to extend
> SecureClassLoader, and specify the correct defineClass method with the
> right CodeSource.
> I'm surprised and disgusted by the ugliness of ant's classloader. Using
> reflection to keep 1.1 compatibility is particularly ugly, and it also
> means that now it's that much harder to fix the codesource bug given the
> way the whole protectiondomain stuff is currently done in
> AntClassLoader. A more sensible approach would be to define two
> classloaders, a 1.1 and a 1.2 one, with a helper delegate class to hold
> common functionality.
> </problem-with-getProtectionDomain/etc-1.1/1.2>

Yep. Gonna have to agree. I have got oodles of bug reports a while back that 
basically related to the way Ant handled this and other things and thus java 
programs that work at command line don't work inside ant. Ants not the only 
product that breaks standard ClassLoader rules though - junit used to (still 
does?) as do a bunch of other hosting programs. Most never apply policy, few 
create proper codesources or create package objects or do any of that jazz.

It would basically mean a massive overhaul to get it working nicely under all 
situations though ;(

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message