private void checkMultiLevelKeys(final Map<String, KeyDef> keysDefMap, final Map<String, String> keysRefMap) {
        String key;
        KeyDef value;
        // tempMap storing values to avoid ConcurrentModificationException
        final Map<String, KeyDef> tempMap = new HashMap<>();
        for (Entry<String, KeyDef> entry : keysDefMap.entrySet()) {
            key = entry.getKey();
            value = entry.getValue();
            // there is multi-level keys exist.
            if (keysRefMap.containsValue(key)) {
                // get multi-level keys
                final List<String> keysList = getKeysList(key, keysRefMap);
                for (final String multikey : keysList) {
                    // update tempMap
                    tempMap.put(multikey, value);
                }
            }
        }
        // update keysDefMap.
        keysDefMap.putAll(tempMap);
    }
private void checkMultiLevelKeys ( final Map < String , KeyDef > keysDefMap , final Map < String , String > keysRefMap ) { String key ; KeyDef value ; final Map < String , KeyDef > tempMap = new HashMap < > ( ) ; for ( Entry < String , KeyDef > entry : keysDefMap . entrySet ( ) ) { key = entry . getKey ( ) ; value = entry . getValue ( ) ; if ( keysRefMap . containsValue ( key ) ) { final List < String > keysList = getKeysList ( key , keysRefMap ) ; for ( final String multikey : keysList ) { tempMap . put ( multikey , value ) ; } } } keysDefMap . putAll ( tempMap ) ; }
Update keysDefMap for multi-level keys