This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: ClassLoader.getSystemResources
Hi,
On Wed, 2002-08-07 at 13:32, Bryce McKinlay wrote:
> Mark Wielaard wrote:
> >On Wed, 2002-08-07 at 07:27, Bryce McKinlay wrote:
> >
> >>+ return Collections.enumeration(Collections.EMPTY_LIST);
> >
> >Note that we have the gnu.java.util.EmptyEnumeration class which
> >prevents creating a new object.
>
> Yes I deliberately didn't use that. This method should generally never
> get called. Unless there is something that is really performance
> critical I'd prefer to use standard collections classes.
Why? I agree that ClassLoaders should override findResources() if they
can but except for URLClassLoader (which I agree will most likely be
used by applications) non of our current ones do at the moment.
Enumeration isn't even part of the collection classes and this makes the
method different from the Classpath version for no valid reason.
Cheers,
Mark