Skip to content

Commit b2ebc77

Browse files
committed
Updates from review
1 parent 9f586b1 commit b2ebc77

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,7 @@ private boolean tryRetain()
413413
@Override
414414
public void release()
415415
{
416-
RetainableByteBuffer buffer = _buffer.get();
417-
if (buffer != null && buffer.release())
418-
_buffer.set(null);
416+
_buffer.getAndUpdate(buffer -> (buffer != null && buffer.release()) ? null : buffer);
419417
}
420418

421419
@Override

0 commit comments

Comments
 (0)