Skip to content

Commit

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

Co-authored-by: immutablecodes <[email protected]>
  • Loading branch information
mergify[bot] and immutablecodes authored Nov 1, 2024
1 parent bc9c235 commit feafa41
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 @@ -196,7 +196,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 @@ -345,7 +345,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 feafa41

Please sign in to comment.