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

Do some code improvement in UserSync

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: usersync
    • Labels:
      None
    • Flags:
      Patch

      Description

      In UserSync.java, there are some duplicate codes.

      if (groupName == null || groupName.isEmpty()) {
                  // Perform basic user search and get the group name from the user's group attribute name.
                  findBasicUserProperties(ldapContext, false);
              }
      
              if (groupName == null || groupName.isEmpty()) {
                  // Perform adv user search and get the group name from the user's group attribute name.
                  findAdvUserProperties(ldapContext, false);
              }
      

      We checked if the groupName is null twice, IMO, we can put them together.

        Attachments

          Activity

            People

            • Assignee:
              zhangqiang2 Qiang Zhang
              Reporter:
              zhangqiang2 Qiang Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: