ensure InputStream gets closed after loading swagger.properties
@@ -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) {
