8256370: Add asserts to Reference.getInactive()

Reviewed-by: mchung
This commit is contained in:
Roman Kennke 2020-11-17 15:46:34 +00:00
parent c255b18cfc
commit f2a9d02de2
2 changed files with 4 additions and 1 deletions

View file

@ -353,6 +353,8 @@ public abstract class Reference<T> {
* null, and would subsequently not finalize the referent/finalizee.
*/
T getInactive() {
assert this instanceof FinalReference;
assert next == this; // I.e. FinalReference is inactive
return this.referent;
}