private List < Object > reprocessFormParams ( Method method , List < Object > origParams , Message m ) { Form form = null ; boolean hasFormParamAnnotations = false ; Object [ ] newValues = new Object [ origParams . size ( ) ] ; java . lang . reflect . Parameter [ ] methodParams = method . getParameters ( ) ; for ( int i = 0 ; i < methodParams . length ; i ++ ) { if ( Form . class . equals ( methodParams [ i ] . getType ( ) ) ) { form = ( Form ) origParams . get ( i ) ; } if ( methodParams [ i ] . getAnnotation ( FormParam . class ) != null ) { hasFormParamAnnotations = true ; } else { newValues [ i ] = origParams . get ( i ) ; } } if ( ! hasFormParamAnnotations || form == null ) { return origParams ; } for ( int i = 0 ; i < newValues . length ; i ++ ) { if ( newValues [ i ] == null ) { String formFieldName = methodParams [ i ] . getAnnotation ( FormParam . class ) . value ( ) ; List < String > values = form . asMap ( ) . get ( formFieldName ) ; newValues [ i ] = InjectionUtils . createParameterObject ( values , methodParams [ i ] . getType ( ) , methodParams [ i ] . getParameterizedType ( ) , methodParams [ i ] . getAnnotations ( ) , ( String ) origParams . get ( i ) , false , ParameterType . FORM , m ) ; if ( LOG . isLoggable ( Level . FINEST ) ) { LOG . log ( Level . FINEST , "replacing @FormParam value of {0} with {1}" , new Object [ ] { origParams . get ( i ) , newValues [ i ] } ) ; } } } return Arrays . asList ( newValues ) ; }
Liberty change start - CXF - 7860