From 33e443e71a463f57406eef311792512584a98b4d 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 13d03ca262..30d71ea689 100644 --- a/buffer/src/main/java/io/netty/buffer/ByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/ByteBuf.java @@ -1680,6 +1680,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();