private Object manageMapIfNecessary(Map<Object, Object> value) {
		boolean containsRuntimeRefs = false;
        for (Entry<Object, Object> e : value.entrySet()) {
            Object v = e.getValue();
            if (v instanceof RuntimeBeanReference) {
                containsRuntimeRefs = true;
            }
            if (v instanceof BeanConfiguration) {
                BeanConfiguration c = (BeanConfiguration) v;
                e.setValue(c.getBeanDefinition());
                containsRuntimeRefs = true;
            }
        }
		if(containsRuntimeRefs) {
//			return new ManagedMap(map);
            ManagedMap m = new ManagedMap();
            m.putAll(value);
            return m;
        }
		return value;
	}
private Object manageMapIfNecessary ( Map < Object , Object > value ) { boolean containsRuntimeRefs = false ; for ( Entry < Object , Object > e : value . entrySet ( ) ) { Object v = e . getValue ( ) ; if ( v instanceof RuntimeBeanReference ) { containsRuntimeRefs = true ; } if ( v instanceof BeanConfiguration ) { BeanConfiguration c = ( BeanConfiguration ) v ; e . setValue ( c . getBeanDefinition ( ) ) ; containsRuntimeRefs = true ; } } if ( containsRuntimeRefs ) { ManagedMap m = new ManagedMap ( ) ; m . putAll ( value ) ; return m ; } return value ; }
Checks whether there are any runtime refs inside a Map and converts
it to a ManagedMap if necessary

@param value The current map
@return A ManagedMap or a normal map