Skip to content

Commit

Permalink
fix: NPE when saving system configuration (#6417)
Browse files Browse the repository at this point in the history
#### What type of PR is this?
/kind bug
/area core
/milestone 2.18.x

#### What this PR does / why we need it:
修复保存系统配置时出现的 NPE 问题

此问题由于 PR #6346 导致
#### Which issue(s) this PR fixes:
Fixes #6416

#### Does this PR introduce a user-facing change?
```release-note
None
```
  • Loading branch information
guqing authored Jul 31, 2024
1 parent 8e8599b commit 0110438
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.DisposableBean;
Expand Down Expand Up @@ -186,7 +187,7 @@ private Map<String, JsonNode> getCachedConfigData(@NonNull Cache cache) {
@Override
public Controller setupWith(ControllerBuilder builder) {
ExtensionMatcher matcher =
extension -> configMapName.equals(extension.getMetadata().getName());
extension -> Objects.equals(extension.getMetadata().getName(), configMapName);
return builder
.extension(new ConfigMap())
.syncAllOnStart(true)
Expand Down

0 comments on commit 0110438

Please sign in to comment.