Skip to content

Conversation

KarthikRv93
Copy link

…ontrol characters


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@marcphilipp marcphilipp linked an issue Jul 22, 2025 that may be closed by this pull request
@sormuras sormuras modified the milestone: 6.0.0-RC1 Aug 15, 2025
// Handle case where string ends with whitespace
if (inWhitespace) {
whitespaceBuffer.append("]");
sb.append(whitespaceBuffer.toString());

Choose a reason for hiding this comment

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

sb.append(whitespaceBuffer);
instead of creating new object each time, I think we can use the existing buffer

if (!inWhitespace) {
inWhitespace = true;
whitespaceBuffer.setLength(0);
whitespaceBuffer.append("[");

Choose a reason for hiding this comment

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

    whitespaceBuffer.setLength(0);
    whitespaceBuffer.append('[');
    inWhitespace = true;

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.

Indicate "diff" for assertEquals() failures
3 participants