Mark AbstractRefCounted#mustIncRef as final (#113761)

The overridden `RefCounted` methods on `AbstractRefCounted` are all
`final`, but `mustIncRef` uses the default implementation and can still
be overridden. For the avoidance of doubt, this commit marks
`mustIncRef` as `final`.
This commit is contained in:
David Turner 2024-10-02 11:16:42 +01:00 committed by GitHub
parent baef1386da
commit f9921168f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,12 @@ public abstract class AbstractRefCounted implements RefCounted {
} }
} }
@Override
public final void mustIncRef() {
// making this implementation `final` (to be consistent with every other `RefCounted` method implementation)
RefCounted.super.mustIncRef();
}
@Override @Override
public final boolean tryIncRef() { public final boolean tryIncRef() {
do { do {