fix optional NPE

This commit is contained in:
ken.lj 2020-11-23 12:05:57 +08:00
parent a2b9e0c4c5
commit f8f752a924
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public class MigrationRuleListener implements RegistryProtocolListener, Configur
private volatile String rawRule;
public MigrationRuleListener() {
this.configuration = ApplicationModel.getEnvironment().getDynamicConfiguration().orElseGet(null);
this.configuration = ApplicationModel.getEnvironment().getDynamicConfiguration().orElse(null);
logger.info("Listening for migration rules on dataId-" + RULE_KEY + " group-" + DUBBO_SERVICEDISCOVERY_MIGRATION);
configuration.addListener(RULE_KEY, DUBBO_SERVICEDISCOVERY_MIGRATION, this);