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

There is no catch statement in Utils#updateMap

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.13.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      There is no catch statement in Utils class( In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java line : 148)

      If there is no catch statement, We can't know why if exception is happended..

      I think add catch statement and throw exception..

        Activity

        Hide
        skrho skrho added a comment -

        I added catch statement and RuntimeException statment, so if exception is happened throw error message..

        Show
        skrho skrho added a comment - I added catch statement and RuntimeException statment, so if exception is happened throw error message..
        Hide
        elserj Josh Elser added a comment -

        skrho, I don't follow the reason for your change. The point of the try/finally is to ensure that the ZipFile is closed before the method returns. The code also does not handle the IOException that can be thrown and lets the caller deal with that exception (throws IOException. A try block does not always require a catch statement. This method looks fine to me as-is.

        Show
        elserj Josh Elser added a comment - skrho , I don't follow the reason for your change. The point of the try/finally is to ensure that the ZipFile is closed before the method returns. The code also does not handle the IOException that can be thrown and lets the caller deal with that exception ( throws IOException . A try block does not always require a catch statement. This method looks fine to me as-is.

          People

          • Assignee:
            rsk13th skrho
            Reporter:
            skrho skrho
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development