RFR 8223349: [lworld] Reflection support on static <init> factory methods for inline types

Roger Riggs Roger.Riggs at oracle.com
Fri May 31 18:14:08 UTC 2019

Hi Mandy,

Updated: http://cr.openjdk.java.net/~rriggs/webrev-init-8223349-3/index.html

On 05/31/2019 12:59 PM, Mandy Chung wrote:
> Hi Roger,
> line 185 and 190, these 2 methods create a new instance of a given 
> class which is not necessarily Point class.   Perhaps simply take out 
> this println.
> Is there a test for checking getDeclaredConstructor(s) to find the 
> static init factory and verify that invocation produces an expected 
> inline value?
Added a test for pointConstructors; probably a bit sensitive to the 
exact constructors declared in Point.
It needs a more comprehensive/flexible test when API changes settle down.
> FYI.  I find a few issues in java.lang.invoke in looking up and 
> unreflect the static init factory and working on a patch for it. I 
> will take care of the new tests for Lookup::findConstructor, 
> findStatic, unreflectConstructor etc.
Thanks, Roger

> Mandy
> On 5/30/19 7:53 AM, Roger Riggs wrote:
>> Please review changes to java.lang.reflection for inline classes to 
>> support lookup and invocation
>> of constructors (static method <init>).
>> The  changes to MethodHandles.Lookup appear to already been done.
>> Jira:
>> https://bugs.openjdk.java.net/browse/JDK-8223349
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-init-8223349/index.html
>> Thanks, Roger

More information about the valhalla-dev mailing list