public static void validateNewStoreDefsAreNonBreaking(List<StoreDefinition> oldStoreDefs, List<StoreDefinition> newStoreDefs){
        Map<String, StoreDefinition> oldStoreMap = new HashMap<String, StoreDefinition>();
        Map<String, StoreDefinition> newStoreMap = new HashMap<String, StoreDefinition>();
        for (StoreDefinition storeDef : oldStoreDefs){
           oldStoreMap.put(storeDef.getName(), storeDef);
        }
        for (StoreDefinition storeDef : newStoreDefs){
           newStoreMap.put(storeDef.getName(), storeDef);
        }
        for (String storeName : oldStoreMap.keySet()){
            if (newStoreMap.containsKey(storeName)){
               validateNewStoreDefIsNonBreaking(oldStoreMap.get(storeName), newStoreMap.get(storeName));
            }
        }
    }
public static void validateNewStoreDefsAreNonBreaking ( List < StoreDefinition > oldStoreDefs , List < StoreDefinition > newStoreDefs ) { Map < String , StoreDefinition > oldStoreMap = new HashMap < String , StoreDefinition > ( ) ; Map < String , StoreDefinition > newStoreMap = new HashMap < String , StoreDefinition > ( ) ; for ( StoreDefinition storeDef : oldStoreDefs ) { oldStoreMap . put ( storeDef . getName ( ) , storeDef ) ; } for ( StoreDefinition storeDef : newStoreDefs ) { newStoreMap . put ( storeDef . getName ( ) , storeDef ) ; } for ( String storeName : oldStoreMap . keySet ( ) ) { if ( newStoreMap . containsKey ( storeName ) ) { validateNewStoreDefIsNonBreaking ( oldStoreMap . get ( storeName ) , newStoreMap . get ( storeName ) ) ; } } }
Ensure that new store definitions that are specified for an update do not include breaking changes to the store.
@param oldStoreDefs
@param newStoreDefs