[CXF-6067] Fixing ProviderFactory code checking the generic types