Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2238

String comparison should not use ‘==’ in ServiceUtil.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • master
    • 2.0.0, 1.1.1, 1.2.1
    • admin
    • Patch

    Description

      Here is related code:

      for(RangerPolicy.RangerPolicyItemCondition condition : policyItem.getConditions()) {
          if(condition.getType() == "ipaddress") {
      

      equals() should be used to compare Strings.

      Attachments

        Activity

          People

            zhangqiang2 Qiang Zhang
            zhangqiang2 Qiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: