diff --git a/CHANGES.md b/CHANGES.md index 718efe94bf1..4984124cfb9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Release Notes. Apollo 1.9.1 ------------------ +* [Remove spring dependencies from internal code](https://github.com/apolloconfig/apollo/pull/3937) ------------------ All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/9?closed=1) diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfig.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfig.java index 5ab8338ce9b..8222937dd08 100644 --- a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfig.java +++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfig.java @@ -39,8 +39,6 @@ import com.ctrip.framework.apollo.util.ExceptionUtil; import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.RateLimiter; -import org.springframework.util.CollectionUtils; - /** * @author Jason Song(song_s@ctrip.com) @@ -186,10 +184,10 @@ public Set getPropertyNames() { // propertyNames include system property and system env might cause some compatibility issues, though that looks like the correct implementation. Set fromRepository = this.getPropertyNamesFromRepository(); Set fromAdditional = this.getPropertyNamesFromAdditional(); - if (CollectionUtils.isEmpty(fromRepository)) { + if (fromRepository == null || fromRepository.isEmpty()) { return fromAdditional; } - if (CollectionUtils.isEmpty(fromAdditional)) { + if (fromAdditional == null || fromAdditional.isEmpty()) { return fromRepository; } Set propertyNames = Sets