[ https://issues.apache.org/jira/browse/RANGER-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16647517#comment-16647517 ]
Qiang Zhang commented on RANGER-2238: ------------------------------------- Committed to Apache master branch: https://github.com/apache/ranger/commit/3d59099dcff757d420748793d6d9abe904a59165 Committed to Apache ranger-1.2 branch: https://github.com/apache/ranger/commit/d21b7b54e75c5b0155345cc1fbcd181241e36ca0 Committed to Apache ranger-1.1 branch: https://github.com/apache/ranger/commit/821b6ecbca2672f3ea6d278ddaa779a822fdb305 Committed to Apache ranger-1 branch: https://github.com/apache/ranger/commit/f2a080d5dd9e9b931b8f19045633b36a7b76a2bd > 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 > Fix For: 2.0.0 > > 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)