hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-7452) Boolean comparison is done through reference equality rather than using equals
Date Sat, 19 Jul 2014 03:50:38 GMT
Ted Yu created HIVE-7452:
----------------------------

             Summary: Boolean comparison is done through reference equality rather than using
equals
                 Key: HIVE-7452
                 URL: https://issues.apache.org/jira/browse/HIVE-7452
             Project: Hive
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


In Driver#doAuthorization():
{code}
        if (tbl != null && !tableAuthChecked.contains(tbl.getTableName()) &&
            !(tableUsePartLevelAuth.get(tbl.getTableName()) == Boolean.TRUE)) {
{code}
The above comparison should be done using .equals() method.
The comparison below doesn't evaluate to true:
{code}
    Boolean b = new Boolean(true);
    if (b == Boolean.TRUE) {
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message