Should setAccessible be part of Java or not? (was Re: It's not too late for access control)
Alan Bateman
Alan.Bateman at oracle.com
Thu Jul 14 10:28:22 UTC 2016
On 14/07/2016 11:16, Andrew Haley wrote:
> :
> OK. But "in the very long term" such a basic language change needs
> all stakeholders to be consulted.
I agree (although it's not really a language change in that it's API way
to suppress access checks specified by the language).
> :
> 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.
-Alan
More information about the jigsaw-dev
mailing list