Skip to content

Commit

Permalink
[BugFix] Fix NullPointerException in CatalogMgr.java (StarRocks#52501)
Browse files Browse the repository at this point in the history
Signed-off-by: immutablecodes <[email protected]>
Signed-off-by: immutablecodes <[email protected]>
Co-authored-by: alvin <[email protected]>
Signed-off-by: zhiminr.ren <[email protected]>
  • Loading branch information
2 people authored and renzhimin7 committed Nov 7, 2024
1 parent 208ef2c commit 0a2cc70
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 @@ -191,7 +191,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 @@ -340,7 +340,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 0a2cc70

Please sign in to comment.