Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Remove redundant invoke of trySyncFromUpstream (apolloconfig#3698) (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- authored May 21, 2021
1 parent 0fb159f commit f41a73b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public void setUpstreamRepository(ConfigRepository upstreamConfigRepository) {
m_upstream.removeChangeListener(this);
}
m_upstream = upstreamConfigRepository;
trySyncFromUpstream();
upstreamConfigRepository.addChangeListener(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public ApolloConfig queryConfig(@PathVariable String appId, @PathVariable String
if (!namespaceBelongsToAppId(appId, namespace)) {
Release publicRelease = this.findPublicConfig(appId, clientIp, clusterName, namespace,
dataCenter, clientMessages);
if (!Objects.isNull(publicRelease)) {
if (Objects.nonNull(publicRelease)) {
releases.add(publicRelease);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Release loadConfig(String clientAppId, String clientIp, String configAppI
Release clusterRelease = findRelease(clientAppId, clientIp, configAppId, configClusterName, configNamespace,
clientMessages);

if (!Objects.isNull(clusterRelease)) {
if (Objects.nonNull(clusterRelease)) {
return clusterRelease;
}
}
Expand All @@ -50,7 +50,7 @@ public Release loadConfig(String clientAppId, String clientIp, String configAppI
if (!Strings.isNullOrEmpty(dataCenter) && !Objects.equals(dataCenter, configClusterName)) {
Release dataCenterRelease = findRelease(clientAppId, clientIp, configAppId, dataCenter, configNamespace,
clientMessages);
if (!Objects.isNull(dataCenterRelease)) {
if (Objects.nonNull(dataCenterRelease)) {
return dataCenterRelease;
}
}
Expand Down

0 comments on commit f41a73b

Please sign in to comment.