--- old/src/java.base/share/classes/java/lang/ref/PhantomReference.java 2019-05-23 15:39:18.441433248 -0400 +++ new/src/java.base/share/classes/java/lang/ref/PhantomReference.java 2019-05-23 15:39:18.045431284 -0400 @@ -30,6 +30,9 @@ * Phantom reference objects, which are enqueued after the collector * determines that their referents may otherwise be reclaimed. Phantom * references are most often used to schedule post-mortem cleanup actions. + *

+ * The referent must not be an instance of an inline class; such a value + * can never have another reference to it and cannot be held in a reference type. * *

Suppose the garbage collector determines at a certain point in time * that an object is @@ -72,6 +75,8 @@ * @param referent the object the new phantom reference will refer to * @param q the queue with which the reference is to be registered, * or {@code null} if registration is not required + * @throws IllegalArgumentException if the referent is an instance of an + * {@link Class#isInlineClass() inlineClass} */ public PhantomReference(T referent, ReferenceQueue q) { super(referent, q);