RFR 8223582 [lworld] WeakReference of an inline type should throw
mandy.chung at oracle.com
Wed May 29 18:24:45 UTC 2019
Throwing IAE is fine for LW2 to catch uses of a Reference object on an
inline value and will explore this topic in the future milestone.
On 5/24/19 3:52 AM, Roger Riggs wrote:
> Please review this change (for LW2) to disallow inline values from
> being referenced by
> FinalReference, WeakReference, SoftReference, and PhantomReferences.
> Since by definition there cannot be another reference to the value,
> the Reference would be cleared.
> Throwing an exception on construction of the ref will prevent an
> accident dependency
> on otherwise undefined behavior.
> There are further notes in the issue.
> Thanks, Roger
More information about the valhalla-dev