justinmclean opened a new issue, #8203:
URL: https://github.com/apache/gravitino/issues/8203
### What would you like to be improved?
Guard against a null TagInfo in CreateTagFailureEvent by only constructing a
NameIdentifier when TagInfo is present, preventing a NullPointerException.
Unit test to show the issue:
```
@Test
public void testNullTagInfoDoesNotThrow() {
Exception ex = new Exception("boom");
CreateTagFailureEvent event = new CreateTagFailureEvent("user",
"metalake", null, ex);
Assertions.assertNull(event.tagInfo());
Assertions.assertNull(event.identifier());
Assertions.assertEquals(ex, event.exception());
Assertions.assertEquals(OperationType.CREATE_TAG, event.operationType());
Assertions.assertEquals(OperationStatus.FAILURE,
event.operationStatus());
}
```
### How should we improve?
Prevent the NPE.
--
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]