Skip to content

Commit

Permalink
[BugFix] Fix NullPointerException in CatalogMgr.java (backport #52501) (
Browse files Browse the repository at this point in the history
#52537)

Co-authored-by: immutablecodes <[email protected]>
  • Loading branch information
mergify[bot] and immutablecodes authored Nov 1, 2024
1 parent 3b5cb0c commit ef65b9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fe/fe-core/src/main/java/com/starrocks/server/CatalogMgr.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void alterCatalog(AlterCatalogStmt stmt) {
Map<String, String> properties = ((ModifyTablePropertiesClause) stmt.getAlterClause()).getProperties();
String serviceName = properties.get("ranger.plugin.hive.service.name");

if (serviceName.isEmpty()) {
if (Strings.isNullOrEmpty(serviceName)) {
if (Config.access_control.equals("ranger")) {
Authorizer.getInstance().setAccessControl(catalogName, new RangerStarRocksAccessController());
} else {
Expand Down Expand Up @@ -346,7 +346,7 @@ public void replayAlterCatalog(AlterCatalogLog log) {
String catalogName = log.getCatalogName();
Map<String, String> properties = log.getProperties();
String serviceName = properties.get("ranger.plugin.hive.service.name");
if (serviceName.isEmpty()) {
if (Strings.isNullOrEmpty(serviceName)) {
if (Config.access_control.equals("ranger")) {
Authorizer.getInstance().setAccessControl(catalogName, new RangerStarRocksAccessController());
} else {
Expand Down

0 comments on commit ef65b9c

Please sign in to comment.