[
https://issues.apache.org/jira/browse/AXIS2-5880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160273#comment-16160273
]
Andreas Veithen commented on AXIS2-5880:
----------------------------------------
I don't know what static code analysis tool you are using, but the results it
produces are pretty much useless. Take the example of {{WarBasedWSDLLocator}}
(line 68). The method returns an {{InputSource}} with an {{InputStream}}.
Obviously that stream must be open and it is the responsibility of the caller
to close it once it has read the data. Apparently the code analysis tool is
based on the assumption that a stream opened in a method must be closed in the
same method, which is only true if the reference to that stream is not passed
back to the caller or to another method.
> Several Resource leaks
> ----------------------
>
> Key: AXIS2-5880
> URL: https://issues.apache.org/jira/browse/AXIS2-5880
> Project: Axis2
> Issue Type: Bug
> Components: jaxws
> Affects Versions: 1.7.6
> Reporter: Donald Kwakkel
> Attachments: unreleased resources1.png, unreleased resources2.png,
> unreleased resources3.png, unreleased resources4.png, unreleased
> resources5.png
>
>
> Our code check tool found several resource leak issues. See attached picture.
> Some are not real resource leaks because the objects has a finalize method,
> but even then it is better to close the resource itself because it is not
> defined when the GC will close them.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]