On 28/07/16 18:03, Alan Bateman wrote: > On 28/07/2016 16:59, Andrew Dinn wrote: > when converting the URI to a URL, we'll get that fixed.
Thanks. That's good to know. > But to your question then the module location is used as the CodeSource: > > * <p> This URI, when present, is used as the {@linkplain > * java.security.CodeSource#getLocation location} value of a {@link > * java.security.CodeSource CodeSource} so that a module's classes > can be > * granted specific permissions when loaded by a {@link > * java.security.SecureClassLoader SecureClassLoader}. > > and so interesting when running with a security manager and granting the > module permissions. Ok, I guess I'll need to look into class SecureClassLoader to see what might happen to the URL. > The main user of ModuleReader is class loaders that load > classes/resources from the modules. ClassLoaders need to implement > methods such as findResource and findResources will attempt to return a > URL to resources in modules defined to the ClassLoader. You should see > your find method invoked for these cases. Ah, yes of course. However, my ModuleReader is only there to squirt class bytes into the module on behalf of the agent. So, I doubt the ModuleReader will ever need to do resource loading. Thanks you very much for your help. regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander