From 2a28fe7f273775022c0465948130eb36d7cf833b Mon Sep 17 00:00:00 2001 From: eyalkoren <41850454+eyalkoren@users.noreply.github.com> Date: Thu, 27 Dec 2018 16:12:57 +0200 Subject: [PATCH] Casting to parent Buffer (#401) --- .../main/java/co/elastic/apm/agent/impl/transaction/Db.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Db.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Db.java index 41c6363b4c..f97fdad6c3 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Db.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Db.java @@ -29,6 +29,7 @@ import org.jctools.queues.atomic.MpmcAtomicArrayQueue; import javax.annotation.Nullable; +import java.nio.Buffer; import java.nio.CharBuffer; @@ -47,7 +48,7 @@ public CharBuffer createInstance() { new Resetter() { @Override public void recycle(CharBuffer object) { - object.clear(); + ((Buffer) object).clear(); } });