apache/gravitino

[Improvement] Possible null pointer exception in CatalogRegister.java

Open

#4,189 opened on Jul 18, 2024

View on GitHub
 (14 comments) (0 reactions) (1 assignee)Java (887 forks)auto 404
good first issueimprovement

Repository metrics

Stars
 (3,058 stars)
PR merge metrics
 (PR metrics pending)

Description

What would you like to be improved?

In checkCatalogExist, failedException is set to null and then thrown which could cause a NPE if it is not set in the exception block.

How should we improve?

Move throw failedException; to the correct place in the catch block?

Contributor guide