cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8253) Fix potential unreleased resources
Date Tue, 24 Feb 2015 19:38:04 GMT

    [ https://issues.apache.org/jira/browse/CB-8253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335301#comment-14335301
] 

ASF GitHub Bot commented on CB-8253:
------------------------------------

GitHub user akinzie opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/67

    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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/akinzie/cordova-plugin-camera CB-8253

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/67.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #67
    
----
commit 39d52012ae4ca29eb0cffd2f39afee2b3bf7a0e1
Author: Alan Kinzie <alan.kinzie@sap.com>
Date:   2015-01-07T18:59:22Z

    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

----


> 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message