[
https://issues.apache.org/jira/browse/PROTON-2869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17925904#comment-17925904
]
Arnaud Cogoluègnes commented on PROTON-2869:
--------------------------------------------
PR: https://github.com/apache/qpid-protonj2/pull/13.
> Decoding of smalllong is broker for negative values
> ---------------------------------------------------
>
> Key: PROTON-2869
> URL: https://issues.apache.org/jira/browse/PROTON-2869
> Project: Qpid Proton
> Issue Type: Bug
> Components: protonj2
> Affects Versions: protonj2-1.0.0-M22
> Reporter: Arnaud Cogoluègnes
> Assignee: Timothy A. Bish
> Priority: Major
>
> The current code {{ANDs}} the byte value of the {{smalllong}} with {{0xFF}}.
> This is not necessary for a byte. Moreover {{0xFF}} is an {{int}} in Java, so
> the {{smalllong}} value is first converted to an {{int}} as well, making it
> positive (e.g. {{(byte) -1 & 0xFF = 255}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]