code: @SuppressWarnings({ "rawtypes", "unchecked" })
      protected Object manageMapIfNecessary(Object value) {
          Map map = (Map)value;
          boolean containsRuntimeRefs = false;
          for (Object e : map.values()) {
              if (e instanceof RuntimeBeanReference) {
                  containsRuntimeRefs = true;
                  break;
              }
          }
          if (containsRuntimeRefs) {
              Map managedMap = new ManagedMap();
              managedMap.putAll(map);
              return managedMap;
          }
          return value;
      }
docs: 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