Skip to content

(0.44) Fix String creation to treat a modified UTF8 zero as ASCII #19293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

pshipton
Copy link
Member

Updates j9gc_createJavaLangString().

Issue #19273

Updates j9gc_createJavaLangString().

Issue eclipse-openj9#19273

Signed-off-by: Peter Shipton <[email protected]>
@pshipton pshipton requested a review from keithc-ca April 10, 2024 16:07
/* test https://github.com/eclipse-openj9/openj9/issues/19273 */
String s1 = "a";
String s2 = "b";
AssertJUnit.assertTrue("Incorrect index of \\u0000", (s1 + "\u0000" + s2).lastIndexOf("\u0000") == 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

A more failure-friendly expression of this would have used assertEquals which reports both the actual and expected values. Perhaps you could fix this on the master branch?

@keithc-ca keithc-ca merged commit 8b079b5 into eclipse-openj9:v0.44.0-release Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants