cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject git commit: [CXF-5856]NPE in SwaggerFeature
Date Mon, 07 Jul 2014 11:35:20 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1feb5a781 -> 97dab3da9


[CXF-5856]NPE in SwaggerFeature


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/97dab3da
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/97dab3da
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/97dab3da

Branch: refs/heads/master
Commit: 97dab3da95f4d833888b30ceb553af6436116e9d
Parents: 1feb5a7
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Mon Jul 7 19:35:06 2014 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Mon Jul 7 19:35:06 2014 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/97dab3da/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
index 85e3dd3..2b3d085 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
@@ -26,7 +26,7 @@ import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
 import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
-import org.apache.cxf.jaxrs.provider.ProviderFactory;
+import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
 
 public class SwaggerFeature extends AbstractFeature {
     
@@ -50,7 +50,8 @@ public class SwaggerFeature extends AbstractFeature {
         List<Object> providers = new ArrayList<Object>();
         providers.add(new com.wordnik.swagger.jaxrs.listing.ResourceListingProvider());
         providers.add(new com.wordnik.swagger.jaxrs.listing.ApiDeclarationProvider());
-        ((ProviderFactory)bus.getProperty(ProviderFactory.class.getName())).setUserProviders(providers);
+        ((ServerProviderFactory)server.getEndpoint().get(
+                ServerProviderFactory.class.getName())).setUserProviders(providers);
         com.wordnik.swagger.jaxrs.config.BeanConfig beanConfig = new com.wordnik.swagger.jaxrs.config.BeanConfig();
         beanConfig.setResourcePackage(getResourcePackage());
         beanConfig.setVersion(getVersion());


Mime
View raw message