Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-7863

Potential null reference in TxnDbUtil#prepareDb()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.14.0
    • None
    • None

    Description

      Here is related code:

          Connection conn = null;
          boolean committed = false;
          try {
            conn = getConnection();
      ...
          } finally {
            if (!committed) conn.rollback();
            conn.close();
          }
      

      If getConnection() throws exception, conn.rollback() would be called - leading to NPE.

      Attachments

        1. HIVE-7863.1.patch
          14 kB
          Lars Francke

        Activity

          People

            larsfrancke Lars Francke
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: