You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2014/10/31 01:37:34 UTC
[jira] [Commented] (PIG-4250) Fix Security Risks found by Coverity
[ https://issues.apache.org/jira/browse/PIG-4250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14191114#comment-14191114 ]
Thejas M Nair commented on PIG-4250:
------------------------------------
blocks such as following aren't necessary -
{code}
} catch (IOException e) {
throw e
}
{code}
You can use Hadoop IOUtils.closeStream or cleanup to call close. You don't need the addtional try-catch and null check with that.
> Fix Security Risks found by Coverity
> ------------------------------------
>
> Key: PIG-4250
> URL: https://issues.apache.org/jira/browse/PIG-4250
> Project: Pig
> Issue Type: Bug
> Components: impl
> Reporter: Daniel Dai
> Assignee: Daniel Dai
> Fix For: 0.14.0
>
> Attachments: PIG-4250-1.patch, PIG-4250-2.patch
>
>
> Here is the report: https://scan.coverity.com/projects/3026 (Need to register to see). Most belong to one pattern: not close stream when exception happens.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)