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: Patch: add extensions directory contents to VMClassLoader class path.


>>>>> "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


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