From 981292ffc09512a6608fd343716b8129aec233d0 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 11 May 2015 20:23:04 +0200 Subject: [PATCH] Clarify ByteBuf.duplicate() semantics. Motivation: From the javadocs of ByteBuf.duplicate() it is not clear if the reader and writer marks will be duplicated. Modifications: Add sentence to clarify that marks will not be duplicated. Result: Clear semantics. --- buffer/src/main/java/io/netty/buffer/ByteBuf.java | 1 + 1 file changed, 1 insertion(+) diff --git a/buffer/src/main/java/io/netty/buffer/ByteBuf.java b/buffer/src/main/java/io/netty/buffer/ByteBuf.java index be93120efc..363add7398 100644 --- a/buffer/src/main/java/io/netty/buffer/ByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/ByteBuf.java @@ -1679,6 +1679,7 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable { * This method is identical to {@code buf.slice(0, buf.capacity())}. * This method does not modify {@code readerIndex} or {@code writerIndex} of * this buffer. + * The reader and writer marks will not be duplicated. */ public abstract ByteBuf duplicate();