Re: trySetAccessible
    Alan Bateman 
    Alan.Bateman at oracle.com
       
    Mon Jul 10 09:55:58 UTC 2017
    
    
  
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