Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-3398

HstLinkImpl avoid possible NPE's in case mount instance variable is null

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 3.1.0
    • None

    Description

      in general, it should never happen, however the HstLink api says:

         /**
           * @return the {@link Mount} that can represent this link. This might be an  {@link Mount} which is a different one then the
           *  {@link Mount} the link was created in. This could result in a cross-domain (different hostname) link being created, depending
           * on the backing {@link Mount#getVirtualHost()}. If no {@link Mount} is set, <code>null</code> can be returned
           * 
           */
          Mount getMount();
      

      Most of the HstLinkImpl logic has null checks whenever 'mount' instance var is used, however the org.hippoecm.hst.core.linking.HstLinkImpl.HstLinkImplCharacteristics does not have these null checks. We should include them, and in case the mount is null, return some sensible default

      Attachments

        Activity

          People

            Unassigned Unassigned
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: