You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Timothy A. Bish (Jira)" <ji...@apache.org> on 2022/06/06 16:05:00 UTC

[jira] [Created] (PROTON-2554) [proton-j] CompositeReadableBuffer read string API no advancing position index

Timothy A. Bish created PROTON-2554:
---------------------------------------

             Summary: [proton-j] CompositeReadableBuffer read string API no advancing position index
                 Key: PROTON-2554
                 URL: https://issues.apache.org/jira/browse/PROTON-2554
             Project: Qpid Proton
          Issue Type: Bug
          Components: proton-j
    Affects Versions: proton-j-0.33.10
            Reporter: Timothy A. Bish
            Assignee: Timothy A. Bish
             Fix For: proton-j-0.34.0


The ReadableBuffer API provides methods for reading a string from the remaining readable bytes in the buffer and documents these methods should advance the read index to the limit on return.  The composite readable buffer isn't advancing the position as it passes the bytes off to a CharsetDecoder as a raw array and doesn't complete the operation with a position(limit) call.  This is masked in proton-j currently as all string decodes are done from slices of a buffer or in some cases a duplicate and the buffer slice is cast off afterwards without care for any remaining bytes. 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org