Re: trySetAccessible​

Cédric Champeau cedric.champeau at gmail.com
Mon Jul 10 09:59:26 UTC 2017


This is not really practical. Basically it means that for every Gradle
build script on earth, we would either choose to make them fail on JDK 9,
or be bloated with warnings, that are actually handled.

2017-07-10 11:55 GMT+02:00 Alan Bateman <Alan.Bateman at oracle.com>:

> On 10/07/2017 09:49, Cédric Champeau wrote:
>
>> I second Uwe's comment here: I was surprised as well, I expected the
>> semantics of `trySetAccessible` to be: "let me know if I can do this,
>> respecting the semantics of modules, and if not, return false"
>>
> For the example, trySetAccessible succeeds (returns `true`) because
> `java.lang` is open.  If you run with `--illegal-access=deny` then
> `java.lang` will not be opened and trySetAccessible should return `false`.
>
> -Alan
>


More information about the jigsaw-dev mailing list