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(); } });