This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: add extensions directory contents to VMClassLoader class path.
- From: Tom Tromey <tromey at redhat dot com>
- To: Anthony Green <green at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 16 Jun 2004 18:50:07 -0600
- Subject: Re: Patch: add extensions directory contents to VMClassLoader class path.
- References: <1087429584.3571.62.camel@localhost.localdomain>
- Reply-to: tromey at redhat dot com
>>>>> "Anthony" == Anthony Green <green@redhat.com> writes:
Anthony> This patch adds the contents of the extensions directories to
Anthony> the VMClassLoader's class path. They will appear just before
Anthony> core:/.
At first I thought we needed an extension class loader, but after
talking on irc and reading, I think we all agreed that this approach
is fine -- this loader is used as the parent of the system class
loader (if the user sets one), and so is indistinguishable from an
extension class loader.
So, this looks good to me. Just a couple style hints.
BTW could you check to make sure that the java.ext.dirs property is
documented where ever we document these things? I forget if that is
gcj.texi or just some javadoc somewhere.
Anthony> + return name.endsWith (".jar")
Anthony> + || name.endsWith (".zip");
Multi-line expressions need parens around them. That's in the style
guide, I think the rationale is "so Emacs can indent correctly" :-)
Anthony> + for (int i = files.length - 1; i >= 0; i--)
Anthony> + {
Anthony> + addURL(new URL("file", "", -1, dirname + files[i]));
Anthony> + }
This is super-tweaky, but no braces are needed around a single line
like that.
Tom