[MAGNOLIA-7481] Annotate optional fields in definition, throw MgnlInstantiationException and add severe problem if mandatory field is missing Created: 13/Mar/19 Updated: 13/Mar/19 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Evzen Fochr | Assignee: | Unassigned |
| Resolution: | Unresolved | 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)
|
| Description |
|
Annotate optional fields in definition and consider all other fields as mandatory, throw MgnlInstantiationException and add severe problem if mandatory field is missing. Usecase: Get rid of all null checks when getting mandatory fields from any definition. Another possible implementation is usage of Optional<> and MtB can just add Optional.empty() is field is not found. |