@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) protected Object manageListIfNecessary ( Object value ) { List list = ( List ) value ; boolean containsRuntimeRefs = false ; for ( Object e : list ) { if ( e instanceof RuntimeBeanReference ) { containsRuntimeRefs = true ; break ; } } if ( containsRuntimeRefs ) { List tmp = new ManagedList ( ) ; tmp . addAll ( ( List ) value ) ; value = tmp ; } return value ; }
Checks whether there are any runtime refs inside the list and converts it to a ManagedList if necessary .