On 06/05/16 08:59, Alan Bateman wrote: > On 06/05/2016 08:32, Peter Levart wrote: >> I think that not giving the agent such API just makes life for agent >> writers harder but does not prevent them to break encapsulation in >> arbitrary ways anyway. > > We've been over this a few times, it's on the issues list, but we want > to see how far we can get without adding this method.
Ok, I'll be that guinea pig. > On injecting helpers then if the agent can inject an initializer + > helper method into any public class in the module then it has full > control. It doesn't matter if it's a concealed package because the > initializer (which the agent can trigger to execute without access) just > needs to export the package to the agent. Yes, that's probably the best way to restrict access if you assume the agent is itself in a Jigsaw module. But I doubt all (or even most?) agents will want to use Jigsaw. They certainly won't if they want to implement functionality that is useful to pre- and post-JDK9 runtimes since that will force the devs down the path of dual-source and dual-produuct. That is a very unattractive proposition since it complicates both development and deployment. 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