-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CXF-9107 Clean up coverity resource leaks and a javascript method typo #2253
base: main
Are you sure you want to change the base?
Conversation
integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/PlugInClassLoader.java
Outdated
Show resolved
Hide resolved
@@ -540,7 +540,7 @@ function org_apache_cxf_pad_string(string, len, pad, type) { | |||
pad = typeof(pad) == 'string' ? pad : ' '; | |||
|
|||
if (type == org_apache_cxf_pad_string_PAD_BOTH) { | |||
string = org_apache_cxf_pad_sring(Math.floor(len / 2) + string.length, | |||
string = org_apache_cxf_pad_string(Math.floor(len / 2) + string.length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -239,8 +239,8 @@ public T readFrom(Class<T> type, Type genericType, Annotation[] anns, MediaType | |||
} else { | |||
response = checkAdapter(response, type, anns, false); | |||
} | |||
realStream.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this may not work: the stream is not created here and should not be closed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this within a try-with-resources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure it is being done this way (higher in the stack), when the request / response body is being processed
https://issues.apache.org/jira/browse/CXF-9107
Clean up coverity resource leaks (inputstream and resultset) and a javascript method typo