On Mon, 27 Sep 2021 11:23:43 GMT, Claes Redestad <redes...@openjdk.org> wrote:
> This looks good, assuming Mandy is OK with extracting and adding to the > microbenchmarks from JEP 416 I'm okay to include these microbenchmarks in this patch. I will merge the change with JEP 416. > A stray thought is why not most fields in `Field`/`Method`/`Constructor` are > `final`, as my IDE suggests. I can't find any hotspot code that injects > values to these fields. See `Reflection::new_method` and `Reflection::new_field`. > Experimentally changing most fields in `Field` to final seem to pass at least > all the java/lang/reflect tests. Since this is a trusted package `@Stable` > should then be pointless. This reminds to double check [1] and realized that `java.lang.reflect` is not in the list of trusted packages for `@Stable`. I'll add that in JEP 416. [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/ci/ciField.cpp#L219 ------------- PR: https://git.openjdk.java.net/jdk/pull/5694