RFR JDK-8181425: Reflection API defend against issues with internal VM derived value type

Paul Sandoz paul.sandoz at oracle.com
Tue Jun 20 22:01:43 UTC 2017


That explains why i could not see what Maurizio was observing :-)

Looks good.

Paul.

> On 20 Jun 2017, at 14:50, Mandy Chung <mandy.chung at oracle.com> wrote:
> 
> 
>> On Jun 20, 2017, at 1:48 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>> 
>> Hi Mandy - overall looks very good. One question - is this code correct?
>> 
>> public static Class<?> loadValueTypeClass(Class<?> vcc, String className) {
>> 113         if (!isValueType(vcc)) {
>> 114             throw new IllegalArgumentException(vcc.getName() + " is a derived value class");
>> 115         }
>> 116         return JLA.loadValueTypeClass(vcc.getModule(), vcc.getClassLoader(), className);
>> 117     }
>> 
> 
> My bad! I added this last minute check that are in the progress of testing.
> It intends to do the same check as getValueTypeClass.
> 
> if (isValueType(vcc)) {
>    throw new IllegalArgumentException(vcc.getName() + " is a derived value class");
> }
> 
> I updated webrev.00 in place.
> 
> Mandy



More information about the valhalla-dev mailing list