Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-2736

ApplicationServiceGeneric.searchUsers does not correctly handle several directories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • None
    • 1.6.2
    • None

      The code loops over directories, retrieving users from each, but exits the loop when it has the number of users that should be returned, despite the fact that it started from zero, not from the startIndex.

      so at line 648:

      if (!isAllResults && (results.size() >= query.getMaxResults()))
      

      query.getMaxResults() should be totalResults

      edit Actually, even that fix contradicts this comment above the loop:

      
              // we require every directory to return <code>totalResults</code> results instead of
              // <code>totalResults - results.size()</code> because the users returned could be duplicates of existing results
      

      So the break should be removed.

              Unassigned Unassigned
              tom@atlassian.com Tom Davies
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: