This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 3b4ed05 Avoid overriding a custom host value in Swagger2Feature
3b4ed05 is described below
commit 3b4ed05b1217040ead101fb14c0441d41241f32d
Author: Sergey Beryozkin <[email protected]>
AuthorDate: Mon Oct 23 10:42:28 2017 +0100
Avoid overriding a custom host value in Swagger2Feature
---
.../src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 b33392f..351e043 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
@@ -420,7 +420,9 @@ public class Swagger2Feature extends AbstractSwaggerFeature
{
// get the path part
URI u = URI.create(address);
setBasePath(u.getPath());
- setHost(u.getPort() < 0 ? u.getHost() : u.getHost() + ":" +
u.getPort());
+ if (getHost() == null) {
+ setHost(u.getPort() < 0 ? u.getHost() : u.getHost() + ":" +
u.getPort());
+ }
} else {
setBasePath(address);
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].