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

John Rose john.r.rose at oracle.com
Fri May 31 19:46:31 UTC 2019

On May 31, 2019, at 12:13 PM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> Hi,
> A minor update to make the test code checking constructors more generic and used for
> Point, Line, and NonFlattenedValue.  It only checked the signatures, but does not invoke each constructor.
> webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-init-8223349-4/index.html

Reviewed again, except:  The new test looks fragile with
respect to declaration order, and (IIRC) method order
is not preserved by reflection.  This could fail spuriously
if c.getDeclaredConstructors reports a surprising new order.
Quick fix:  Add a sorting phase to the stream that produces
declaredSig.  Make sure your golden list is also sorted.

More information about the valhalla-dev mailing list