groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: trySetAccessible for Java 9
Date Wed, 05 Jul 2017 19:51:33 GMT
On 05.07.2017 19:27, Uwe Schindler wrote:
> Working on it.
> I just looked at the code and found out that it already has a „fallback“ 
> mechanism: It first tries setAccessible(array, true) and then falls back 
> to do it one by one. I think with Java 9, wenn cannot do this.

we can still do the array version without getting the messages... it 
just fails to do so in most cases. I think it is still worth it.

> So I’d 
> change that to:
>   * Get methodhandle in static initializer, if not there set to NULL
>   * In the makeAccessible method check for nullness of methodhandle: if
>     null proceed as before, if not do a for-loop and call
>     trySetAccesible() on all, ignoring return value.

and here I would do as suggested and go withe VM plugin approach we 
already have and just add another method.

bye Jochen

View raw message