#vulnerable code 
                                @Override
    public void addConfigListener(String dataId, ConfigChangeListener listener) {
        configListenersMap.putIfAbsent(dataId, new ArrayList<>());
        configChangeNotifiersMap.putIfAbsent(dataId, new ArrayList<>());
        ConfigChangeNotifier configChangeNotifier = new ConfigChangeNotifier(dataId, listener);
        configChangeNotifiersMap.get(dataId).add(configChangeNotifier);
        if (null != listener.getExecutor()) {
            listener.getExecutor().submit(configChangeNotifier);
        } else {
            consulConfigExecutor.submit(configChangeNotifier);
        }
    } 
                            #location 6 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                @Override
    public void addConfigListener(String dataId, ConfigChangeListener listener) {
        configListenersMap.putIfAbsent(dataId, new ArrayList<>());
        configChangeNotifiersMap.putIfAbsent(dataId, new ArrayList<>());
        ConfigChangeNotifier configChangeNotifier = new ConfigChangeNotifier(dataId, listener);
        configChangeNotifiersMap.get(dataId).add(configChangeNotifier);
        if (null != listener.getExecutor()) {
            listener.getExecutor().submit(configChangeNotifier);
        } else {
            consulNotifierExecutor.submit(configChangeNotifier);
        }
    }