On Mon, 4 Oct 2021 15:51:18 GMT, Peter Levart <plev...@openjdk.org> wrote:
> One way this could be improved is to "stamp" the modifiers field with an > additional bit (say 0x8000_0000) to always hold a non-zero value. > Method::getModifiers() would then clear that bit in a returned value to stay > compatible. Native Method/Field/Constructor construction would have to be > modified too. Alternatively, it'd become a non-issue when `java.lang.reflect` and `jdk.internal.reflect` are added to the trusted final-field packages. ------------- PR: https://git.openjdk.java.net/jdk/pull/5694