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: RFC Patch: only add absolute file paths to URLClassLoader


On Sun, 2005-07-24 at 14:58 -0600, Tom Tromey wrote:
> Anthony> If bug.class is in your cwd, this currently prints file:./bug.class.
> Anthony> But I believe this should really be an absolute path, like
> Anthony> file:///tmp/bug.class, or something like that.
> 
> I think this is also PR 20198.
> 

Yes, I added some notes and my patch to that PR.

> Let's do a test to see if the jdk does this in URLClassLoader or not.
> I'm not sure how exactly we could test this... maybe 'strace -eopen'
> would tell us?  The question is whether we canonicalize in
> URLClassLoader or when creating the CodeSource (and resources and
> whatnot).

My patch does it in a third place, SystemClassLoader.  But now I think
it should go in URLClassLoader.

I have no idea how to go about testing the JDK.  Sure, strace will tell
us what files it opens - but what would the test code look like?

AG



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