apache / apache/gravitino

[Improvement] Possible null pointer exception in CatalogRegister.java

Open
#4,189 14 comments 0 reactions 1 assignee Claimed by @simarjeetss View on GitHub
good first issue improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 15h
Merged PRs (30d)
315

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.