Hmm,

So it appears that the original author relinquishes all rights protected under copyright law, it's in the public domain.

In effect there is no license, there are no restrictions whatsoever.

We can get clarification from Apache Legal.

On Technical merit alone, can you see a benefit using URI's in PreferredClassLoader? We can introduce it in the inheritance hierarchy between URLClassLoader and PreferredClassLoader without breaking backward compatibility if necessary.

The sun Bug ID: 6810437 states that URL should not be used as a key in collections and URI or the string representation should be used instead.

I've got a revised PreferredClassProvider that uses URI's in it's collections and Arrays internally, I'm currently testing it for any issues.

The URL javadoc states that URI should be used for parsing strings, then converted to URL.

Interestingly URI.toURL() checks if URI is absolute and throws an IllegalArgumentException if it's relative (null scheme). This causes a number of malformed URL loader tests to fail, although not because they fail, but because the exception is not the expected failure MalformedURLException. Rather than re-write all the tests, I'm catching the IllegalArgumentException and re-throwing it as a MalformedURLException, which is better, because it avoids throwing a runtime exception. In effect URI.toURL() provides added protection against malformed URL's. Although it may cause some failures in user code with codebase annotations that aren't RFC 2396 compliant, it hasn't caused any failures in the loader tests. To avoid breaking existing code, by throwing unexpected exceptions, when a URI is instantiated by PreferredClassProvider internally, I'm catching URISyntaxException and rethrowing it as MalformedURLException with a message stating URL's must be RFC 2396 compliant.

URI is converted to URL for PreferredClassLoader. I've also added a fix for River 265, to avoid caching Context ClassLoaders found using the findOriginLoader method.

While on topic, do you have any thoughts on River-147?

Cheers,

Peter.




Dennis Reedy wrote:
Hi Peter,

The URICLassLoader I use has been released into the public domain as explained 
here:

http://creativecommons.org/licenses/publicdomain

Does that still mean that you cant use it with River?

Dennis

On Dec 10, 2011, at 1012PM, Peter Firmstone wrote:

Dennis,

You utilise URIClassLoader which uses URI instead of URL, I've noticed that 
it's MPL, GPL or LGPL licensed so we can't distribute it with River.

I've been looking into a subtle performance issue with PreferredClassProvider 
and PreferredClassLoader, an array of URL's are used as keys in a Map in 
PreferredClassProvider, I believe that this has a lot to do with the 
performance issues that Chris is experiencing with Reggie as posted on the user 
list.

Any thoughts about making PreferredClassProvider and PreferredClassLoader use 
URI internally?

Regards,

Peter.



Reply via email to