Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13802

Having orphans favourite throw NPE on search api

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.4.1
    • Fix Version/s: 8.5
    • Component/s: Database, Web API
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      From this thread on the community forum, the issue is a combination of two things:

      1 - The "MoreCollectors" class used as a collector to build the list of user's favourite componentUuid does not handle null values (because it uses under the hood a Guava ImmutableList, that is documented to throw an NPE is an element is null)

      2 - the "properties" table may contain orphan values, with prop_key = 'favourite' but a null componentUuid

       

      The remediation can be to either ensure at DB level that we don't have any more orphan values for this table or to filter them out at the API level.

        Attachments

          Activity

            People

            Assignee:
            jacek.poreda Jacek Poreda
            Reporter:
            pierre.guillot Pierre Guillot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: