mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8256370: Add asserts to Reference.getInactive()
Reviewed-by: mchung
This commit is contained in:
parent
c255b18cfc
commit
f2a9d02de2
2 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue