Erroneous cast in IBBInputStream's read() method

Description

The read() method returns a to int casted byte.

The problem is that a byte to in cast in java is done with two complements values (e.g. 0xFF becomes 0xFFFFFFFF), therefore every value greater as 0x7F will be seen as negative value because the highest bit is set. This violates the contract for read(), which states that read() will return a value in the range from 0 to 254.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Labels

Ignite Forum URL

Components

Fix versions

Affects versions

Priority

Created December 18, 2012 at 3:32 PM
Updated October 28, 2020 at 1:28 PM
Resolved January 5, 2013 at 12:55 PM