cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7316] Removing redundant serializer
Date Wed, 02 Aug 2017 09:29:34 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 75b06d6d7 -> 1909d85f7


[CXF-7316] Removing redundant serializer


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

Branch: refs/heads/master
Commit: 1909d85f7d0cbbfd84c8b826f4aabc3963891013
Parents: 75b06d6
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Aug 2 10:29:14 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Aug 2 10:29:14 2017 +0100

----------------------------------------------------------------------
 .../cxf/jaxrs/swagger/Swagger2Feature.java      | 26 ++++----------------
 1 file changed, 5 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1909d85f/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
----------------------------------------------------------------------
diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
index c283c9f..8260281 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
+++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
@@ -85,8 +85,6 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
 
     private String ignoreRoutes;
 
-    private Swagger2Serializers swagger2Serializers;
-
     private boolean supportSwaggerUi = true;
 
     private String swaggerUiVersion;
@@ -131,7 +129,7 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
 
         List<Object> swaggerResources = new LinkedList<>();
         
-        if (swagger2Serializers == null && customizer == null) {
+        if (customizer == null) {
             customizer = new Swagger2Customizer();
         }
         ApiListingResource apiListingResource = new Swagger2ApiListingResource(customizer);
@@ -169,15 +167,9 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
                 }
             }
         }
-        if (swagger2Serializers != null) {
-            swagger2Serializers.setClassResourceInfos(cris);
-            swagger2Serializers.setDynamicBasePath(dynamicBasePath);
-            providers.add(swagger2Serializers);
-        } else {
-            customizer.setClassResourceInfos(cris);
-            customizer.setDynamicBasePath(dynamicBasePath);
-        }
-
+        customizer.setClassResourceInfos(cris);
+        customizer.setDynamicBasePath(dynamicBasePath);
+        
         providers.add(new ReaderConfigFilter());
 
         if (usePathBasedConfig) {
@@ -210,11 +202,7 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
         if (swagger != null && securityDefinitions != null) {
             swagger.setSecurityDefinitions(securityDefinitions);
         }
-        if (customizer == null) {
-            swagger2Serializers.setBeanConfig(beanConfig);
-        } else {
-            customizer.setBeanConfig(beanConfig);
-        }
+        customizer.setBeanConfig(beanConfig);
     }
 
     public boolean isUsePathBasedConfig() {
@@ -273,10 +261,6 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
         this.ignoreRoutes = ignoreRoutes;
     }
 
-    public void setSwagger2Serializers(final Swagger2Serializers swagger2Serializers) {
-        this.swagger2Serializers = swagger2Serializers;
-    }
-
     @Override
     protected void setBasePathByAddress(String address) {
         if (!address.startsWith("/")) {


Mime
View raw message