ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qiang Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-2238) String comparison should not use ‘==’ in ServiceUtil.java
Date Mon, 08 Oct 2018 05:52:00 GMT

     [ https://issues.apache.org/jira/browse/RANGER-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Qiang Zhang updated RANGER-2238:
--------------------------------
    Attachment:     (was: 0001-RANGER-2238-String-comparison-should-not-use-in-Serv.patch)

> String comparison should not use ‘==’ in ServiceUtil.java
> ---------------------------------------------------------
>
>                 Key: RANGER-2238
>                 URL: https://issues.apache.org/jira/browse/RANGER-2238
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: master
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>            Priority: Minor
>              Labels: patch
>         Attachments: 0001-RANGER-2238-String-comparison-should-not-use-in-Serv.patch
>
>
> Here is related code:
> {code:java}
> for(RangerPolicy.RangerPolicyItemCondition condition : policyItem.getConditions()) {
>     if(condition.getType() == "ipaddress") {
> {code}
> equals() should be used to compare Strings.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message