-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
- As trySync has invoked trySyncFromUpstream, so remove it from setUpstreamRepository.
public LocalFileConfigRepository(String namespace, ConfigRepository upstream) {
m_namespace = namespace;
m_configUtil = ApolloInjector.getInstance(ConfigUtil.class);
this.setLocalCacheDir(findLocalCacheDir(), false);
this.setUpstreamRepository(upstream);
this.trySync();
}public void setUpstreamRepository(ConfigRepository upstreamConfigRepository) {
...
trySyncFromUpstream();
upstreamConfigRepository.addChangeListener(this);
}protected void sync() {
//sync with upstream immediately
boolean syncFromUpstreamResultSuccess = trySyncFromUpstream();
}- Use Objects.nonNull instead of !Objects.isNull
Metadata
Metadata
Assignees
Labels
No labels