RFR Checks in Pointer.cast(LayoutType)

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Mon Jun 18 14:41:09 UTC 2018


Pointer.cast(LayoutType) does not perform any checks as of now. Cast to 
any destination pointee LayoutType is allowed. I've added 
Layout.equals/.hashCode & simple checks in Pointer.cast(LayoutType) for 
now. For now, cast from any pointer to void* and vice versa is allowed. 
When pointee layouts are equal, the cast is allowed. Any other case 
results in exception.

Please review: 
http://cr.openjdk.java.net/~sundar/pointer_cast_checks/webrev.01/

Thanks,
-Sundar


More information about the panama-dev mailing list