diff --git a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java index 9411d63d0da..b60d3f7529d 100644 --- a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java +++ b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java @@ -367,7 +367,7 @@ public void writeTo(Content.Sink sink, long offset, long length, Callback callba boolean retained = false; try { - retained = retain(); + retained = cachedRetain(); if (retained) sink.write(true, BufferUtil.slice(_buffer.getByteBuffer(), Math.toIntExact(offset), Math.toIntExact(length)), Callback.from(this::release, callback)); else @@ -388,7 +388,7 @@ public void writeTo(Content.Sink sink, long offset, long length, Callback callba * its internal buffer if it is. * @return true if this content can be used and has been retained, false otherwise. */ - private boolean retain() + private boolean cachedRetain() { return _cache.computeIfPresent(_cacheKey, (s, cachingHttpContent) -> {