[
https://issues.apache.org/jira/browse/CB-8253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14530961#comment-14530961
]
ASF subversion and git services commented on CB-8253:
-----------------------------------------------------
Commit b0ee9dd90514a8e714e817f1f93d0834bf314d2a in cordova-plugin-camera's
branch refs/heads/master from [~akinzie]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-camera.git;h=b0ee9dd
]
CB-8253 Fix potential unreleased resources
There was a place (~line 701) in CameraLauncher.java where there was the
potential for input and output streams to never be closed if an exception
occurs at the wrong time. There were some other places where an
InputStream was used anonymously, and so would never be closed.
This change introduces try/finally blocks to ensure that the streams will
always end up closed.
Change-Id: I479bceddcd631bfec45c3f5ee7e88ddb04c59073
Signed-off-by: Joe Bowser <[email protected]>
(Closes #90)
> Fix potential unreleased resources
> ----------------------------------
>
> Key: CB-8253
> URL: https://issues.apache.org/jira/browse/CB-8253
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin Camera
> Reporter: Alan Kinzie
> Assignee: Alan Kinzie
>
> There are several places in the Camera plugin where streams are not closed in
> a finally block allowing for the possibility they will never be closed if an
> exception occurs at the wrong place.
> Although this doesn't affect functionality as far as I can tell (if enough
> resources streams are not closed properly maybe it could affect performance),
> it does show up as an issue in static code analysis tools (such as Fortify).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]