[CFGUI-118] Definitions app filter yields NPE error banner with null/missing values Created: 11/Jun/20 Updated: 25/Mar/22 |
|
| Status: | Open |
| Project: | Definitions App |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Mikaël Geljić | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| 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
|
||||||||||||
| Description |
|
If the module registry contains a null entry (e.g. Blossom produced null module name in definition metadata, see PR for UI's CaptionFilteringDataProviderWrapper computes its size from plain Stream#count, and since the wrapped data-provider ModuleDefinitionSelectFieldSupport.ModuleDefinitionDataProvider#fetch returns a stream with distinct/sorted operations, Stream#count attempts (and fails) to compare distinct null entries, hence no count. java.lang.NullPointerException: null
at java.util.Comparators$NaturalOrderComparator.compare(Comparators.java:52) ~[?:1.8.0_144]
...
at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:387) ~[?:1.8.0_144]
at java.util.stream.DistinctOps$1$2.end(DistinctOps.java:168) ~[?:1.8.0_144]
...
at java.util.stream.ReferencePipeline.count(ReferencePipeline.java:526) ~[?:1.8.0_144]
at info.magnolia.ui.contentapp.CaptionFilteringDataProviderWrapper.size(CaptionFilteringDataProviderWrapper.java:95) ~[magnolia-ui-framework-6.2.1.jar:?]
|