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] Initializing the customizer earlier
Date Tue, 01 Aug 2017 21:15:33 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 720b41e21 -> 5e2d2a1a6


[CXF-7316] Initializing the customizer earlier


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

Branch: refs/heads/master
Commit: 5e2d2a1a60dcf11fd4bf70e592e60b7d8ddd4e41
Parents: 720b41e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Aug 1 22:15:03 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Aug 1 22:15:03 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5e2d2a1a/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 562e5db..bf0b658 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
@@ -130,6 +130,10 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
         }
 
         List<Object> swaggerResources = new LinkedList<>();
+        
+        if (swagger2Serializers == null && customizer == null) {
+            customizer = new Swagger2Customizer();
+        }
         ApiListingResource apiListingResource = new Swagger2ApiListingResource(customizer);
         swaggerResources.add(apiListingResource);
 
@@ -169,9 +173,6 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
             swagger2Serializers.setDynamicBasePath(dynamicBasePath);
             providers.add(swagger2Serializers);
         } else {
-            if (customizer == null) {
-                customizer = new Swagger2Customizer();
-            }
             customizer.setClassResourceInfos(cris);
             customizer.setDynamicBasePath(dynamicBasePath);
         }


Mime
View raw message