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/27 08:48:53 UTC
[cxf] 01/02: [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 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit c17b8f61ec863a253762bc14ad48f4415fa7dd8c
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
(cherry picked from commit d00d731682ef5707000a5186203ecf6b1cc1731c)
---
.../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 9161997..7ea8d4c 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
@@ -246,8 +246,15 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
props.load(is);
} catch (IOException ex) {
props = null;
+ } finally {
+ try {
+ is.close();
+ } catch (IOException ignore) {
+ // ignore
+ }
}
}
+
return props;
}
--
To stop receiving notification emails like this one, please contact
"commits@cxf.apache.org" <co...@cxf.apache.org>.