Should setAccessible be part of Java or not? (was Re: It's not too late for access control)
Andrew Haley
aph at redhat.com
Thu Jul 14 11:51:11 UTC 2016
On 14/07/16 11:28, Alan Bateman wrote:
>> > Yes, indeed, and that is potentially a significant problem. My
>> > comment stands: there is a serious possibility that his will make it
>> > impossible to use (non-exported) Jigsaw modules for some kinds of
>> > programming. This is exactly the kind of decision that needs all
>> > stakeholders to be consulted.
>> >
>> > It ought to be possible to have some kind of conditional export which
>> > only allows such access by (e.g.) suitably privileged frameworks or
>> > tools. But I have no desire to get involved in such design issues: I
>> > am only going to say that this is an issue which requires wider
>> > consultation.
>> >
> This is #ReflectiveAccessToNonExportedTypes on the JSR 376 issues list.
> The problem is reasonably well understood and there are several
> proposals and approaches being discussed and considered.
Forgive me if I've missed something, but
#ReflectiveAccessToNonExportedTypes does not deal with the need to
make fields or methods accessible to the framework. That's what
setAccessible is used for. It would certainly be nice for a
framework to be able to say "make it accessible, but only to me."
Andrew.
More information about the jigsaw-dev
mailing list