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

Boolean comparison is done through reference equality rather than using equals

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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) {
      

        Attachments

          Activity

            People

            • Assignee:
              HS KangHS
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: