You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by de...@apache.org on 2017/12/25 11:57:45 UTC
[cxf] branch master updated: [CXF-7595] ensure InputStream gets
closed after loading swagger.properties
This is an automated email from the ASF dual-hosted git repository.
deki 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 d00d731 [CXF-7595] ensure InputStream gets closed after loading swagger.properties
d00d731 is described below
commit d00d731682ef5707000a5186203ecf6b1cc1731c
Author: Dennis Kieselhorst <ma...@dekies.de>
AuthorDate: Mon Dec 25 12:50:52 2017 +0100
[CXF-7595] ensure InputStream gets closed after loading swagger.properties
---
.../main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java | 7 +++++++
1 file changed, 7 insertions(+)
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 341997e..19608e1 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
@@ -205,8 +205,15 @@ public class Swagger2Feature extends AbstractSwaggerFeature implements SwaggerUi
props.load(is);
} catch (IOException ex) {
props = null;
+ } finally {
+ try {
+ is.close();
+ } catch (IOException ignore) {
+ // ignore
+ }
}
}
+
return props;
}
protected void initBeanConfig(BeanConfig beanConfig, Properties props) {
--
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].