Skip to content

Commit ada6294

Browse files
klbokenobodyiam
andauthored
Remove spring dependencies from internal code (#3937)
* add tech-support-qq-4.png * Update README.md * Enhance the user experience in the scenario of submitting duplicate keys * Modify the key-value conflict exception prompt, adjust the code style * fix:Remove spring dependencies from internal code * doc(CHANGES.md): update CHANGES.md Co-authored-by: Jason Song <nobodyiam@gmail.com>
1 parent f909b8d commit ada6294

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Apollo 1.10.0
1111
* [switch apollo.config-service log from warning to info level](https://github.com/ctripcorp/apollo/pull/3884)
1212
* [Make Access Key Timestamp check configurable](https://github.com/ctripcorp/apollo/pull/3908)
1313
* [remove ctrip profile](https://github.com/ctripcorp/apollo/pull/3920)
14+
* [Remove spring dependencies from internal code](https://github.com/apolloconfig/apollo/pull/3937)
1415

1516
------------------
1617
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/8?closed=1)

apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfig.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
import com.ctrip.framework.apollo.util.ExceptionUtil;
4040
import com.google.common.collect.ImmutableMap;
4141
import com.google.common.util.concurrent.RateLimiter;
42-
import org.springframework.util.CollectionUtils;
43-
4442

4543
/**
4644
* @author Jason Song(song_s@ctrip.com)
@@ -186,10 +184,10 @@ public Set<String> getPropertyNames() {
186184
// propertyNames include system property and system env might cause some compatibility issues, though that looks like the correct implementation.
187185
Set<String> fromRepository = this.getPropertyNamesFromRepository();
188186
Set<String> fromAdditional = this.getPropertyNamesFromAdditional();
189-
if (CollectionUtils.isEmpty(fromRepository)) {
187+
if (fromRepository == null || fromRepository.isEmpty()) {
190188
return fromAdditional;
191189
}
192-
if (CollectionUtils.isEmpty(fromAdditional)) {
190+
if (fromAdditional == null || fromAdditional.isEmpty()) {
193191
return fromRepository;
194192
}
195193
Set<String> propertyNames = Sets

0 commit comments

Comments
 (0)