Re: AnonymousClassLoader and ClassLoader

2008-04-25 Thread Rémi Forax
John Rose a écrit : > On Apr 25, 2008, at 8:47 AM, Rémi Forax wrote: > >> John Rose a écrit : >>> On Apr 24, 2008, at 2:26 AM, Rémi Forax wrote: >>> In my opinion, getResource() is not the only method that makes this assumption >>> >>> The getResource method probably needs to be adjusted

Re: AnonymousClassLoader and ClassLoader

2008-04-25 Thread Charles Oliver Nutter
Rémi Forax wrote: > The problem is: even if you want to use it lightly, i think you can't > control > the fact that an user can send your closure or any instance of a class > loaded > by the anonymous loader to a lib that relies on getClassLoader(). Generally the purposes I have in mind for anon

Re: AnonymousClassLoader and ClassLoader

2008-04-25 Thread John Rose
On Apr 25, 2008, at 8:47 AM, Rémi Forax wrote: > John Rose a écrit : >> On Apr 24, 2008, at 2:26 AM, Rémi Forax wrote: >> >>> In my opinion, getResource() is not the only method that makes this >>> assumption >> >> The getResource method probably needs to be adjusted since >> anonymous classes h

Re: AnonymousClassLoader and ClassLoader

2008-04-25 Thread Rémi Forax
John Rose a écrit : On Apr 24, 2008, at 2:26 AM, Rémi Forax wrote: In my opinion, getResource() is not the only method that makes this assumption The getResource method probably needs to be adjusted since anonymous classes have names that are intentionally distorted. The anonymous class na

Re: AnonymousClassLoader and ClassLoader

2008-04-24 Thread John Rose
On Apr 24, 2008, at 2:26 AM, Rémi Forax wrote: > In my opinion, getResource() is not the only method that makes this > assumption The getResource method probably needs to be adjusted since anonymous classes have names that are intentionally distorted. The anonymous class name ends with "/${h

Re: AnonymousClassLoader and ClassLoader

2008-04-24 Thread John Rose
On Apr 24, 2008, at 4:43 AM, Rémi Forax wrote: > I answer to myself, it's only in the case the host-class is null, > otherwise the classloader used is the one of the host-class. Right. The new class is supposed to inherit the same access rights, protection domain, class loader, from the host c

Re: AnonymousClassLoader and ClassLoader

2008-04-24 Thread Rémi Forax
Charles Oliver Nutter a écrit : > Rémi Forax wrote: >> Yesterday evening, I've tried to replace the application classloader >> (the one used to load the application) by one that use an anymous >> class loader >> to load the class. And i've tested by launching SwingSet2. >> >> And it doesn't work b

Re: AnonymousClassLoader and ClassLoader

2008-04-24 Thread Charles Oliver Nutter
Rémi Forax wrote: > Yesterday evening, I've tried to replace the application classloader > (the one used to load the application) by one that use an anymous class > loader > to load the class. And i've tested by launching SwingSet2. > > And it doesn't work because UI program like SwingSet looku

Re: AnonymousClassLoader and ClassLoader

2008-04-24 Thread Rémi Forax
Rémi Forax a écrit : > Yesterday evening, I've tried to replace the application classloader > (the one used to load the application) by one that use an anymous class > loader > to load the class. And i've tested by launching SwingSet2. > > And it doesn't work because UI program like SwingSet loo