This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

Andrew> OK, this is the new, improved, low-fat version of the patch.
Andrew> urls was a Vector, and I've changed it to a LinkedHashSet.  When we
Andrew> add a URL, we first check that we haven't added it already, and this
Andrew> prevents the loader from looping.

I don't think this satisfies all the constraints we need to satisfy.

I'm pretty sure there is code out there that assumes that
URLClassLoader.getURLs() will return the exact URLs given to
URLClassLoader, in the exact order.  I think this patch changes this.


The other question I have is about ordering.  Suppose you create a
URLClassLoader with a.jar and b.jar.  Suppose a.jar has a
Class-Path entry pointing to a2.jar.  And finally suppose you are
looking for a resource named R which appears in both a2.jar and b.jar.
Which is found?

I'm sure this case sounds dumb, but I'm picturing the hours of
debugging that will happen when we run into it in the field... better
to be compatible up front.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]