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

Lars Francke commented on HIVE-7863:
------------------------------------

Alan, thanks for checking. I hadn't gotten around to look at the test results 
in detail.

> Potential null reference in TxnDbUtil#prepareDb()
> -------------------------------------------------
>
>                 Key: HIVE-7863
>                 URL: https://issues.apache.org/jira/browse/HIVE-7863
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Lars Francke
>            Priority: Minor
>         Attachments: HIVE-7863.1.patch
>
>
> Here is related code:
> {code}
>     Connection conn = null;
>     boolean committed = false;
>     try {
>       conn = getConnection();
> ...
>     } finally {
>       if (!committed) conn.rollback();
>       conn.close();
>     }
> {code}
> If getConnection() throws exception, conn.rollback() would be called - 
> leading to NPE.



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

Reply via email to