[dubbo-5876] Remove unused variable (#5879)
This commit is contained in:
parent
40e14a5599
commit
40be2972e3
|
|
@ -30,8 +30,6 @@ import java.util.Collection;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
public class Environment extends LifecycleAdapter implements FrameworkExt {
|
||||
public static final String NAME = "environment";
|
||||
|
|
@ -42,7 +40,6 @@ public class Environment extends LifecycleAdapter implements FrameworkExt {
|
|||
private final InmemoryConfiguration externalConfiguration;
|
||||
private final InmemoryConfiguration appExternalConfiguration;
|
||||
|
||||
private final ConcurrentMap<AbstractConfig, CompositeConfiguration> prefixedConfigurations = new ConcurrentHashMap<>();
|
||||
private CompositeConfiguration globalConfiguration;
|
||||
|
||||
private Map<String, String> externalConfigurationMap = new HashMap<>();
|
||||
|
|
@ -116,12 +113,6 @@ public class Environment extends LifecycleAdapter implements FrameworkExt {
|
|||
* @return
|
||||
*/
|
||||
public synchronized CompositeConfiguration getPrefixedConfiguration(AbstractConfig config) {
|
||||
// CompositeConfiguration prefixedConfiguration =
|
||||
// prefixedConfigurations.putIfAbsent(config, new CompositeConfiguration(config.getPrefix(), config.getId()));
|
||||
// if (prefixedConfiguration != null) {
|
||||
// return prefixedConfiguration;
|
||||
// }
|
||||
// prefixedConfiguration = prefixedConfigurations.get(config);
|
||||
CompositeConfiguration prefixedConfiguration = new CompositeConfiguration(config.getPrefix(), config.getId());
|
||||
Configuration configuration = new ConfigConfigurationAdapter(config);
|
||||
if (this.isConfigCenterFirst()) {
|
||||
|
|
|
|||
|
|
@ -42,16 +42,13 @@ public class ServiceRestMetadataStorage {
|
|||
}
|
||||
|
||||
public void append(Set<ServiceRestMetadata> serviceRestMetadata) throws IOException {
|
||||
Set<ServiceRestMetadata> allServiceRestMetadata = new LinkedHashSet<>();
|
||||
storage.read(SERVICE_REST_METADATA_RESOURCE_PATH, reader -> {
|
||||
Gson gson = new Gson();
|
||||
return (List) gson.fromJson(reader, getParameterized(List.class, ServiceRestMetadata.class).getType());
|
||||
}).ifPresent(existedMetadata -> {
|
||||
// Add all existed ServiceRestMetadata
|
||||
allServiceRestMetadata.addAll(existedMetadata);
|
||||
serviceRestMetadata.addAll(existedMetadata);
|
||||
});
|
||||
// Add all new ServiceRestMetadata
|
||||
allServiceRestMetadata.addAll(serviceRestMetadata);
|
||||
write(serviceRestMetadata);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue