This is an automated email from the ASF dual-hosted git repository. tabish pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-proton-j.git
The following commit(s) were added to refs/heads/main by this push: new 05b06967 PROTON-2609 Remove buffer slices and duplicates from the codec 05b06967 is described below commit 05b069671d78c18a2492f631c2c512021b1124d9 Author: Timothy Bish <tabish...@gmail.com> AuthorDate: Thu Sep 15 10:46:05 2022 -0400 PROTON-2609 Remove buffer slices and duplicates from the codec Ensure that buffer position is moved to reflect requested size regardless of what the decoder might have read. --- proton-j/src/main/java/org/apache/qpid/proton/codec/DecoderImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proton-j/src/main/java/org/apache/qpid/proton/codec/DecoderImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/codec/DecoderImpl.java index cfce5893..58dcfd1e 100644 --- a/proton-j/src/main/java/org/apache/qpid/proton/codec/DecoderImpl.java +++ b/proton-j/src/main/java/org/apache/qpid/proton/codec/DecoderImpl.java @@ -1076,11 +1076,14 @@ public class DecoderImpl implements ByteBufferDecoder <V> V readRaw(TypeDecoder<V> decoder, int size) { final int oldLimit = _buffer.limit(); + final int oldPosition = _buffer.position(); + final V decode; try { decode = decoder.decode(this, _buffer.limit(_buffer.position() + size)); } finally { + _buffer.position(oldPosition + size); _buffer.limit(oldLimit); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org