#ReflectiveAccessByInstrumentationAgents

Andrew Dinn adinn at redhat.com
Fri May 6 08:47:23 UTC 2016


On 06/05/16 09:37, Alan Bateman wrote:
> On 06/05/2016 09:16, Andrew Dinn wrote:
>> :
>> Yes, that's probably the best way to restrict access if you assume the
>> agent is itself in a Jigsaw module.
> Your agent may not be in a named module but it will be in an unnamed
> module. Once you catch up on the concepts then I think it should be much
> clearer.

Oh, no, I grokked that. The way I intend to use it (i.e. compatibly with
what happens in earlier JDKs) my agent it will be loaded by either the
bootstrap or system loader and hence will be in their respective unnamed
module.

What I don't want to do is export the API provided by a concealed
class/package that exposes a module check -free setAccessible to
anything other than the Byteman class which uses it. If I follow your
suggestion then I would potentially expose setAccessible to any class in
the system classpath. So, rather than use module import/export checks I
think I need to employ a caller class check.

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


More information about the jigsaw-dev mailing list