Hive
  1. Hive
  2. HIVE-7928

There is no catch statement in Utils#updateMap

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Minor 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 added a comment -

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

        Show
        skrho added a comment - I added catch statement and RuntimeException statment, so if exception is happened throw error message..
        Hide
        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
        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:
            skrho
            Reporter:
            skrho
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development