Skip to content

Fix Type.getValueBitSize in case of a CharType#943

Merged
swissiety merged 1 commit intosoot-oss:developfrom
marcus-h:fix-char-value-bit-size
Jun 6, 2024
Merged

Fix Type.getValueBitSize in case of a CharType#943
swissiety merged 1 commit intosoot-oss:developfrom
marcus-h:fix-char-value-bit-size

Conversation

@marcus-h
Copy link
Copy Markdown
Collaborator

@marcus-h marcus-h commented Jun 5, 2024

According to jls-4.2 [1], the value bit size of a char is 16 bit. The old code
returned 32 bit.

Note that the added TypeTest is not executed by default, when running
"mvn test". Since other tests are also affected, I assume this is the
intended behavior.

[1] https://docs.oracle.com/javase/specs/jls/se22/html/jls-4.html#jls-4.2

Copy link
Copy Markdown
Collaborator

@swissiety swissiety left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice finding

According to jls-4.2 [1], the value bit size of a char is 16 bit. The old
code returned 32 bit.

Note that the added TypeTest is not executed by default, when running
"mvn test". Since other tests are also affected, I assume this is the
intended behavior.

[1] https://docs.oracle.com/javase/specs/jls/se22/html/jls-4.html#jls-4.2
@marcus-h marcus-h force-pushed the fix-char-value-bit-size branch from e030202 to 16efca9 Compare June 5, 2024 18:15
@marcus-h
Copy link
Copy Markdown
Collaborator Author

marcus-h commented Jun 5, 2024

I just did a forced push to my branch in order to pacify the style checker.

@swissiety swissiety merged commit 9a92cf9 into soot-oss:develop Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants