You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2018/02/02 14:17:43 UTC
[cxf] branch 3.1.x-fixes updated: [CXF-7629] Checking other
standard providers too
This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
new fbb190d [CXF-7629] Checking other standard providers too
fbb190d is described below
commit fbb190d3b1412b90dd109d0bdc84fe3dfce96141
Author: Sergey Beryozkin <sb...@gmail.com>
AuthorDate: Fri Feb 2 14:00:56 2018 +0000
[CXF-7629] Checking other standard providers too
---
.../main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java | 8 ++++----
.../java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java | 7 +++----
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
index 7bb9dbe..830fd52 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
@@ -578,8 +578,8 @@ public abstract class ProviderFactory {
if (filterContractSupported(provider, providerCls, MessageBodyWriter.class)) {
addProviderToList(messageWriters, provider);
}
-
- if (ContextResolver.class.isAssignableFrom(providerCls)) {
+
+ if (filterContractSupported(provider, providerCls, ContextResolver.class)) {
addProviderToList(contextResolvers, provider);
}
@@ -594,8 +594,8 @@ public abstract class ProviderFactory {
if (filterContractSupported(provider, providerCls, WriterInterceptor.class)) {
writeInts.add((ProviderInfo<WriterInterceptor>)provider);
}
-
- if (ParamConverterProvider.class.isAssignableFrom(providerCls)) {
+
+ if (filterContractSupported(provider, providerCls, ParamConverterProvider.class)) {
paramConverters.add((ProviderInfo<ParamConverterProvider>)provider);
}
}
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
index 4e09c24..ec81b23 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
@@ -258,10 +258,9 @@ public final class ServerProviderFactory extends ProviderFactory {
Object feature = provider.getProvider();
dynamicFeatures.add((DynamicFeature)feature);
}
-
-
- if (ExceptionMapper.class.isAssignableFrom(providerCls)) {
- addProviderToList(exceptionMappers, provider);
+
+ if (filterContractSupported(provider, providerCls, ExceptionMapper.class)) {
+ addProviderToList(exceptionMappers, provider);
}
}
--
To stop receiving notification emails like this one, please contact
sergeyb@apache.org.