Skip to content

Commit 9b341b1

Browse files
authored
Mark AbstractRefCounted#mustIncRef as final (#113761) (#113932)
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`.
1 parent 817bc90 commit 9b341b1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libs/core/src/main/java/org/elasticsearch/core/AbstractRefCounted.java

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public final void incRef() {
4646
}
4747
}
4848

49+
@Override
50+
public final void mustIncRef() {
51+
// making this implementation `final` (to be consistent with every other `RefCounted` method implementation)
52+
RefCounted.super.mustIncRef();
53+
}
54+
4955
@Override
5056
public final boolean tryIncRef() {
5157
do {

0 commit comments

Comments
 (0)