justinmclean opened a new issue, #8387:
URL: https://github.com/apache/gravitino/issues/8387
### What would you like to be improved?
In core/src/main/java/org/apache/gravitino/StringIdentifier.java trim
trailing spaces when appending a Gravitino identifier to a comment, preventing
duplicate whitespace in addToComment.
Here's a test that will help:
@Test
public void testAddToCommentAvoidsDuplicateSpace() {
String commentWithSpace = "This is a comment ";
StringIdentifier identifier = StringIdentifier.fromId(1L);
String commentWithId = StringIdentifier.addToComment(identifier,
commentWithSpace);
String expected =
commentWithSpace.trim() + " (From Gravitino, DO NOT EDIT: " +
identifier.toString() + ")";
Assertions.assertEquals(expected, commentWithId);
}
### How should we improve?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]