[
https://issues.apache.org/jira/browse/PROTON-2869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17926909#comment-17926909
]
ASF subversion and git services commented on PROTON-2869:
---------------------------------------------------------
Commit dc9bf077806b6420ddf9774e98bdbd906c6ee403 in qpid-protonj2's branch
refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=qpid-protonj2.git;h=dc9bf077 ]
PROTON-2869 Fix smallint decoding of negative values
Fix decodng handlers and add tests for negative small int values
> Decoding of smalllong and smallint 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
> Fix For: protonj2-1.0.0-M23
>
>
> 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]