Description
The code does not guarantee the correct closing of the Response object, since it does not always reach a response.readEntity or call a response.readEntity(InputStream.class) that does not close the connection either.
See:
https://jersey.github.io/documentation/latest/client.html#d0e5222
Swagger-codegen version
swagger-codegen-cli-2.2.2.jar
Swagger declaration file content or url
Command line used for generation
-l java --library jersey2
Steps to reproduce
Related issues
Suggest a Fix
...
Response response = null;
try {
if ("GET".equals(method)) {
response = invocationBuilder.get();
...
} finally {
try {
response.close();
} catch (Exception e) {}
}
}
Description
The code does not guarantee the correct closing of the Response object, since it does not always reach a response.readEntity or call a response.readEntity(InputStream.class) that does not close the connection either.
See:
https://jersey.github.io/documentation/latest/client.html#d0e5222
Swagger-codegen version
swagger-codegen-cli-2.2.2.jar
Swagger declaration file content or url
Command line used for generation
-l java --library jersey2
Steps to reproduce
Related issues
Suggest a Fix
...
Response response = null;
try {
if ("GET".equals(method)) {
response = invocationBuilder.get();
...
} finally {
try {
response.close();
} catch (Exception e) {}
}
}