From 9a1bba5b67e2dcfbd024c36ae12e9e5dbe664ddc Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 29 Mar 2019 15:25:28 -0400 Subject: [PATCH] NettyDataBufferFactory.wrap(ByteBuf) calls touch() Closes gh-21960 --- .../springframework/core/io/buffer/NettyDataBufferFactory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBufferFactory.java b/spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBufferFactory.java index 9d9e0a3993f..14931d4243a 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBufferFactory.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBufferFactory.java @@ -90,6 +90,7 @@ public class NettyDataBufferFactory implements DataBufferFactory { * @return the wrapped buffer */ public NettyDataBuffer wrap(ByteBuf byteBuf) { + byteBuf.touch(); return new NettyDataBuffer(byteBuf, this); }