RFR: JDK-8216558: Lookup.unreflectSetter(Field) fails to throw IllegalAccessException for final fields

Mandy Chung mandy.chung at oracle.com
Fri Mar 22 00:35:00 UTC 2019


217 //If this is a USA test, then only the fraction of the expected 
failures will occur; those which are both static and final. 218 if (fl 
!= FieldLookup.MH_UNREFLECT_SETTER_ACCESSIBLE && 
actualFieldNames.stream().anyMatch(s->!(s.contains("static")&&(s.contains("final"))))) 
What is a USA test? Why the assertion becomes conditional? Have you 
considered another way doing it? Mandy


On 3/21/19 9:51 AM, Adam Farley8 wrote:
> Hi Mandy,
>
> Good spot. Have updated the webrev.
>
> http://cr.openjdk.java.net/~afarley/8216558/webrev/
>
> Could you review the proposed change?
>
> Also, I ran the invoke tests as advised, and the only one that
> fails is "LFGarbageCollectedTest.java", which also fails in the
> same way when run against a non-patched java, so I think we're ok.
>
> Best Regards
>
> Adam Farley
> IBM Runtimes



More information about the core-libs-dev mailing list