[ https://issues.apache.org/jira/browse/PROTON-2869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy A. Bish resolved PROTON-2869. ------------------------------------- Resolution: Fixed > 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: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org