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

Prevent null pointer exception in LinkUtil#convertAbsoluteLinksToUUIDs and #convertLinksFromUUIDPattern

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 5.3.11, 5.4.2
    • None
    • None
    • None
    • Sprint 6 (Kromeriz)

    Description

      We need to check if incoming string is not null because Matcher.match fails with null value later.

      java.lang.NullPointerException
      	at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
      	at java.util.regex.Matcher.reset(Matcher.java:308)
      	at java.util.regex.Matcher.<init>(Matcher.java:228)
      	at java.util.regex.Pattern.matcher(Pattern.java:1088)
      	at info.magnolia.link.LinkUtil.convertAbsoluteLinksToUUIDs(LinkUtil.java:143)
      	at info.magnolia.dam.app.ui.field.factory.AssetsEnabledRichTextFieldFactory$2.convertToModel(AssetsEnabledRichTextFieldFactory.java:125) ...
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                efochr Evzen Fochr
                efochr Evzen Fochr
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 6.25h
                      6.25h