[ 
https://issues.apache.org/jira/browse/PHOENIX-2589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Samarth Jain updated PHOENIX-2589:
----------------------------------
    Attachment: PHOENIX-2589_v2.patch

Here is an updated version of the patch [~ayingshu]. 

1) We don't need to check for tableRef = null since the phxConn.getTableRef() 
already throws a TableNotFoundException if the ref is null. Also, 
ref.getTable() is never null. 

2) The weak references can never be null. I have still changed it to make that 
null check because if it is null then it is a bug.

3) The statements shouldn't be closed the way you had it since in some places 
we are still using that statement further down. Eagerly closing it could result 
in errors. 

I have attached the patch doesn't without white space diff changes to make it 
easier for review.



> Fix a few resource leaks, NULL dereference, NULL_RETURNS issues
> ---------------------------------------------------------------
>
>                 Key: PHOENIX-2589
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2589
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>         Attachments: PHOENIX-2589.patch, PHOENIX-2589_v2.patch
>
>
> Fix a few Coverity reported resource leaks, NULL dereference, NULL_RETURNS 
> issues



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to