[MAGNOLIA-6345] Prevent null pointer exception in LinkUtil#convertAbsoluteLinksToUUIDs and #convertLinksFromUUIDPattern Created: 18/Aug/15 Updated: 15/Apr/16 Resolved: 19/Aug/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.11, 5.4.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Evzen Fochr | Assignee: | Evzen Fochr |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 6.25h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||
| Sprint: | 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) ... |