asfgit closed pull request #376: [CXF-7630] Do not preset namebindings when 
installing through a Feature
URL: https://github.com/apache/cxf/pull/376
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/FilterProviderInfo.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/FilterProviderInfo.java
index 0f04b5e94c8..1c92de28a56 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/FilterProviderInfo.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/FilterProviderInfo.java
@@ -49,7 +49,7 @@ public FilterProviderInfo(Class<?> resourceClass,
                               boolean dynamic,
                               Map<Class<?>, Integer> supportedContracts) {
         super(resourceClass, serviceClass, provider, bus, true);
-        this.nameBinding = Collections.singleton(nameBinding);
+        this.nameBinding = nameBinding == null ? null : 
Collections.singleton(nameBinding);
         this.supportedContracts = supportedContracts;
         this.dynamic = dynamic;
     }
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 bf4ddf1b72d..54eba425543 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
@@ -219,6 +219,8 @@ protected void setProviders(boolean custom, boolean 
busGlobal, Object... provide
                                                                         
providerCls,
                                                                         
featureProvider,
                                                                         
getBus(),
+                                                                        null,
+                                                                        false,
                                                                         
contracts));
                     } else {
                         allProviders.add(featureProvider);
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
index d1b514889d2..02b61a64912 100644
--- 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
+++ 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
@@ -90,7 +90,11 @@ protected void run() {
         providers.add(new PreMatchContainerRequestFilter2());
         providers.add(new PreMatchContainerRequestFilter());
         providers.add(new PostMatchContainerResponseFilter());
-        providers.add(new PostMatchContainerResponseFilter3());
+        providers.add((Feature) context -> {
+            context.register(new PostMatchContainerResponseFilter3());
+
+            return true;
+        });
         providers.add(new PostMatchContainerResponseFilter2());
         providers.add(new CustomReaderBoundInterceptor());
         providers.add(new CustomReaderInterceptor());


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to