Skip to content

Commit 58bed1b

Browse files
committed
fix varhandle after refactoring
1 parent b74d1bf commit 58bed1b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import java.util.concurrent.TimeUnit;
1919
import java.util.function.Supplier;
2020

21-
// FIXME: Build thread local shim for this to toggle using FeatureFlag
2221
public interface ObjectPool<T> {
2322
static <T> ObjectPool<T> withInitial(Supplier<T> supplier, Duration timeout) {
2423
return new HybridPool<>(supplier, timeout.toNanos());
@@ -83,7 +82,7 @@ final class UnboundedObjectPool<T> implements ObjectPool<T> {
8382

8483
static {
8584
try {
86-
VAR_HANDLE = MethodHandles.lookup().findVarHandle(ObjectPool.class, "lastTimeoutCheckNanos", long.class);
85+
VAR_HANDLE = MethodHandles.lookup().findVarHandle(UnboundedObjectPool.class, "lastTimeoutCheckNanos", long.class);
8786
} catch (ReflectiveOperationException e) {
8887
throw new ExceptionInInitializerError(e);
8988
}

0 commit comments

Comments
 (0)