From b454698f856ba2cd49fa59267aac3891b30d3259 Mon Sep 17 00:00:00 2001 From: jason <2353220944@qq.com> Date: Fri, 20 Dec 2024 19:24:37 +0800 Subject: [PATCH] code format --- .../apollo/internals/RemoteConfigRepository.java | 11 ++++++----- .../framework/apollo/core/enums/ConfigSyncType.java | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java index 155f4c58..58519e72 100644 --- a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java +++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java @@ -256,9 +256,9 @@ private ApolloConfig loadApolloConfig() { ApolloConfig result = response.getBody(); - if(result!=null){ + if (result != null) { - ConfigSyncType configSyncType=ConfigSyncType.fromString(result.getConfigSyncType()); + ConfigSyncType configSyncType = ConfigSyncType.fromString(result.getConfigSyncType()); if (configSyncType == ConfigSyncType.INCREMENTAL_SYNC) { @@ -267,7 +267,8 @@ private ApolloConfig loadApolloConfig() { Map previousConfigurations = (previousConfig != null) ? previousConfig.getConfigurations() : null; - result.setConfigurations(mergeConfigurations(previousConfigurations,result.getConfigurationChanges())); + result.setConfigurations( + mergeConfigurations(previousConfigurations, result.getConfigurationChanges())); } } @@ -385,8 +386,8 @@ Map mergeConfigurations(Map previousConfiguratio List configurationChanges) { Map newConfigurations = new HashMap<>(); - if(previousConfigurations!=null){ - newConfigurations=Maps.newHashMap(previousConfigurations); + if (previousConfigurations != null) { + newConfigurations = Maps.newHashMap(previousConfigurations); } if (configurationChanges == null) { diff --git a/apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/ConfigSyncType.java b/apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/ConfigSyncType.java index 540c2d9a..481a59e8 100644 --- a/apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/ConfigSyncType.java +++ b/apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/ConfigSyncType.java @@ -47,7 +47,7 @@ public static ConfigSyncType fromString(String value) { return FULL_SYNC; } for (ConfigSyncType type : values()) { - if (type.value.equals(value)) { + if (type.value.equals(value)) { return type; } }