[MAGNOLIA-7379] CandidateParameterResolver is prone to NPE's when null candidate is passed Created: 14/Sep/18 Updated: 17/Sep/18 Resolved: 14/Sep/18 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5.13, 5.6.8, 5.7.2, 6.0 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Aleksandr Pchelintcev | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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
|
| Epic Link: | 6.0 requisite |
| Sprint: | Basel 155, Basel 156 |
| Story Points: | 1 |
| Description |
|
ComponentProvider#newInstance wil fail if null is passed among the candidate objects. This happens due to how type comparison happens within parameter resolver - each candidate's type is queries (hence the NPE). We can get by with reflective #isInstance call, which will prevent NPE from happening. |