question: public static void addErrors ( List < String > targetList , Map < String , Object > targetMap , Map < String , ? extends Object > callResult ) { List < String > newList ; Map < String , Object > errorMsgMap ; if ( callResult . containsKey ( ModelService . ERROR_MESSAGE ) ) { targetList . add ( ( String ) callResult . get ( ModelService . ERROR_MESSAGE ) ) ; } if ( callResult . containsKey ( ModelService . ERROR_MESSAGE_LIST ) ) { newList = UtilGenerics . checkList ( callResult . get ( ModelService . ERROR_MESSAGE_LIST ) ) ; targetList . addAll ( newList ) ; } if ( callResult . containsKey ( ModelService . ERROR_MESSAGE_MAP ) ) { errorMsgMap = UtilGenerics . checkMap ( callResult . get ( ModelService . ERROR_MESSAGE_MAP ) ) ; targetMap . putAll ( errorMsgMap ) ; } }
target:  Takes the result of an invocation and extracts any error messages and adds them to the targetList or targetMap. This will handle both List and String error messags.