Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7379

CandidateParameterResolver is prone to NPE's when null candidate is passed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.13, 5.6.8, 5.7.2, 6.0
    • Component/s: None
    • Labels:
      None
    • Epic Link:
    • Sprint:
      Basel 155, Basel 156
    • Story Points:
      1
    • Magnolia Release:
      5.5.13, 5.6.9, 5.7.2, 6.0

      Description

      ComponentProvider#newInstance wil fail if null is passed among the candidate objects. This happens due to how type comparison happens within parameter resolver - each candidate's type is queries (hence the NPE).

      We can get by with reflective #isInstance call, which will prevent NPE from happening.

        Attachments

          Activity

            People

            Assignee:
            apchelintcev Aleksandr Pchelintcev
            Reporter:
            apchelintcev Aleksandr Pchelintcev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: