Right. We need an API that returns false with no warning.
-----Original Message----- From: Alan Bateman Sent: Monday, July 10, 2017 5:56 AM To: Cédric Champeau Cc: jigsaw-dev Subject: Re: trySetAccessible 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