Просмотр исходного кода

Remove spring dependencies from internal code(#3937)

kl 3 лет назад
Родитель
Сommit
1ddfa08c1d

+ 1 - 0
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)

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

@@ -39,8 +39,6 @@ import com.ctrip.framework.apollo.tracer.Tracer;
 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 class DefaultConfig extends AbstractConfig implements RepositoryChangeLis
     // propertyNames include system property and system env might cause some compatibility issues, though that looks like the correct implementation.
     Set<String> fromRepository = this.getPropertyNamesFromRepository();
     Set<String> 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<String> propertyNames = Sets