-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly write Long.toBinaryString as an unsigned value
A previous fix to negative longs incorrectly allowed some positive longs that would be represented as negative ints to be printed as negative binary values, instead of as unsigned values. This patch fixes that case and adds tests to confirm that these edge cases are well represented. This bug was introduced by 7616ceb. The binary, hex, and octal tests all fail before this change, the toString test was just for completeness, but wasn't actually broken. Fixes #9764
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters