Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-26651

Possible for IndexOutOfBoundsException if user has made a friend request but their account has been removed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.1
    • Fix Version/s: 2.8.2, 2.9.0
    • Component/s: Profile
    • Labels:
      None
    • Previous Issue Keys:
      PRFL-686

      Description

      There is the possibility for an indexoutofboundsexception if a user makes a friend request but then their account is removed as it will return a false number in the count, but the real list will be less and the subList statement will throw the exception.

      java.lang.IndexOutOfBoundsException: toIndex = 1
      at java.util.SubList.<init>(AbstractList.java:602)
      at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
      at java.util.AbstractList.subList(AbstractList.java:468)
      at org.sakaiproject.profile2.tool.dataproviders.RequestedFriendsDataProvider.iterator(RequestedFriendsDataProvider.java:65)

      The issue here is that the requestedFriendsCount goes directly to the db rather than through the UDS filter like the confirmed friends count does.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                steve.swinsburg Steve Swinsburg
                Reporter:
                steve.swinsburg Steve Swinsburg
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration