mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
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:
parent
baef1386da
commit
f9921168f5
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
public final boolean tryIncRef() {
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue