Hive
  1. Hive
  2. HIVE-7452

Boolean comparison is done through reference equality rather than using equals

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.14.0
    • Component/s: None
    • Labels:
      None

      Description

      In Driver#doAuthorization():

              if (tbl != null && !tableAuthChecked.contains(tbl.getTableName()) &&
                  !(tableUsePartLevelAuth.get(tbl.getTableName()) == Boolean.TRUE)) {
      

      The above comparison should be done using .equals() method.
      The comparison below doesn't evaluate to true:

          Boolean b = new Boolean(true);
          if (b == Boolean.TRUE) {
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            KangHS
            Reporter:
            Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development