You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Mark Brouwer <ma...@cheiron.org> on 2007/03/28 12:26:52 UTC

PreferredClassLoader.getResources(String) versus PreferredClassLoader.getResource(String)

PreferredClassLoader.getResource(String) obeys preferred classes
semantics, however as I just found out, getResources(String) doesn't, is
this deliberate or is this a bug?
-- 
Mark

Re: PreferredClassLoader.getResources(String) versus PreferredClassLoader.getResource(String)

Posted by Mark Brouwer <ma...@cheiron.org>.
Mark Brouwer wrote:
> PreferredClassLoader.getResource(String) obeys preferred classes
> semantics, however as I just found out, getResources(String) doesn't, is
> this deliberate or is this a bug?

Just a very quick correction because I don't want to give a certain Bob
S. the pleasure of slapping me in the face with a morbid joke ...

As I wanted to look how to implement that behavior I noticed
getResources(String) is final on ClassLoader up to J2SE 1.4.2 (see
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4432218) so
apparently it is not possible to implement preferred classes semantics
for getResources(String) which means that I have a major problem as
service providers that are an implementation detail of a Platform are
visible by services running on that Platform while their classes are not.

Slowly my ideal J2SE 1.4.2 world is falling apart, but still I'm holding
on ...

Yes Bob I will file an issue against River, so I will feel the pain of
working against J2SE 1.4.2 even more if we can agree to see this as a bug.
-- 
Mark