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

Boolean comparison is done through reference equality rather than using equals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.14.0
    • None
    • 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

        1. HIVE-7452.patch
          2 kB
          KangHS

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: