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: URLClassLoader update


>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:

Mark> Maybe I should just have included the new URLClassLoader.java
Mark> file since it was based on the GNU Classpath version not on the
Mark> old libgcj version (even though some of the methods were already
Mark> merged).

I read through the Classpath implementation.

Mark> I first wrote some Mauve tests with different params for
Mark> getResource() that should load or not load a particular
Mark> resource.

When working on Eclipse I wrote some tests to make sure we were
creating CodeSource objects similar to the JDKs.  I deleted the tests
though, duh.  Anyway, might be worthwhile.  BTW I liked the idea of
caching CodeSources.

Mark> I will check how other implementations handle this issue by
Mark> running Mauve against kaffe or Sun implementations.

Thanks.

Mark> +	    // Check if it's a jar url
Mark> +	    if (!(file.endsWith("/") || file.endsWith(File.separator)))
Mark> +	      loader = new JarURLLoader(this, newUrl);
>> 
>> I missed that `!' the first few times through this...
>> speaking of which there are various formatting buglets in this code.

Mark> OK, I will fix it up. BTW what is the correct way to format this?
Mark> It isn't cover in http://www.gnu.org/prep/standards_23.html#SEC23

Yeah.  Usually I put a space after the `!'.  This varies from package
to package, I think.

In this case I was more confused by the comment.  I kept reading the
first test as testing for jar files, but actually it is checking for
not-a-directory.

Tom



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