Review Request: JDK-8220282 Add MethodHandle tests on accessing final fields
lance.andersen at oracle.com
Tue Apr 2 19:35:09 UTC 2019
the updates look good.
> On Mar 26, 2019, at 10:58 PM, Mandy Chung <mandy.chung at oracle.com> wrote:
> This is a new version of the patch:
> I made further clean up to this new test.
> It extends MethodHandlesTest.HasFields class to include the test
> cases for instance final fields. HasFields is used to test
> findGetter/findStaticGetter, findSetter/findStaticSetter, and
> A new HasFields::testCasesFor(int testMode) method is added to
> return the test cases where c == Error.class indicates a
> negative test case.
> For getters, all HasFields except bogus_xx fields are positive
> test cases, i.e. no exception is expected.
> For findSetter/findStaticSetter, a final field has no write access
> and setting on a final field is a negative test case.
> For unreflectSetter, non-final fields and instance final fields
> whose accessible flag is true have write access and hence they
> are positive test cases whereas static final fields are negative
> test cases.
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
More information about the core-libs-dev