When resource type is generic and declares more than one type parameter and some of other parameters are used as return type together with collection CXF always returns first resource parameter.
For example resource such this:
Fails miserably with 3.1.9. Reason why it fails is leaky logic in InjectionUtils:
CXF properly discovers type variables but incorrectly assumes that actual collection bound comes as first type parameter. This leads to assumption that return type is Collection<String> instead of Collection<Document<String>>.
Sadly I am not able to patch this code myself because (I think) it requires switching completely to generic type names instead of indexes. This part of code is just getting 4 years old and I believe there is few dead bodies there.
An note here that it used to work with CXF 2.2.7 or some later release thus this seems to be an regression bug.
I checked how jackson classmate handles that and it manages to resolve all type bounds properly.