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

Prevent null pointer exception in LinkUtil#convertAbsoluteLinksToUUIDs and #convertLinksFromUUIDPattern

XMLWordPrintable

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

      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) ...
      

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

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