Two code reported by LGTM, those issues need investigate

https://lgtm.com/projects/g/apache/dubbo/snapshot/001162d4f461e28561b01e2f90b15c1627706cf7/files/dubbo-common/src/main/java/org/apache/dubbo/common/config/Environment.java?sort=name&dir=ASC&mode=heatmap
https://lgtm.com/projects/g/apache/dubbo/snapshot/001162d4f461e28561b01e2f90b15c1627706cf7/files/dubbo-metadata/dubbo-metadata-processor/src/main/java/org/apache/dubbo/metadata/annotation/processing/rest/ServiceRestMetadataStorage.java?sort=name&dir=ASC&mode=heatmap
public Configuration getConfiguration() {
        if (globalConfiguration == null) {
            globalConfiguration = new CompositeConfiguration();
            if (dynamicConfiguration != null) {
                globalConfiguration.addConfiguration(dynamicConfiguration);
            }
            globalConfiguration.addConfiguration(systemConfiguration);
            globalConfiguration.addConfiguration(environmentConfiguration);
            globalConfiguration.addConfiguration(appExternalConfiguration);
            globalConfiguration.addConfiguration(externalConfiguration);
            globalConfiguration.addConfiguration(propertiesConfiguration);
        }
        return globalConfiguration;
    }
    public boolean isConfigCenterFirst() {
        return configCenterFirst;
    }
    @DisableInject
    public void setConfigCenterFirst(boolean configCenterFirst) {
        this.configCenterFirst = configCenterFirst;
    }
    public Optional<DynamicConfiguration> getDynamicConfiguration() {
        return Optional.ofNullable(dynamicConfiguration);
    }
    @DisableInject
    public void setDynamicConfiguration(DynamicConfiguration dynamicConfiguration) {
        this.dynamicConfiguration = dynamicConfiguration;
    }
    @Override
    public void destroy() throws IllegalStateException {