[MAGNOLIA-6671] Unexpected exception log statements when queried definition is backed by an empty YAML file Created: 19/May/16  Updated: 09/Feb/17  Resolved: 30/May/16

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 5.4.7, 5.5

Type: Bug Priority: Major
Reporter: Jaroslav Simak Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-6662 Investigate JVM crash - and if faster... Closed
causality
caused by MAGNOLIA-6451 YAML configuration: changes in includ... Closed
supersession
is superseded by MAGNOLIA-6672 Exceptions after YAML defined templat... Closed
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: Basel 46
Story Points: 3

 Description   

As of MAGNOLIA-6451 we have introduced a utility which will read all the involved YAML files and combine their data into an aggregated map (=> Map2Bean etc).
It happens that if there's no data collected - a constant immutable empty map will be returned by map aggregating utility (Collections.emptyMap()). YamlDefinitionProvider however, could still attempt to push some metadata properties in that map, which causes exceptions with such a stacktrace: https://gist.github.com/p4elkin/1aac1845e017e2bb809547e5889f6a79

As of MAGNOLIA-6672 (and this commit) - a mutable map is returned and no such exception will occur any longer.


Generated at Mon Feb 12 04:16:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.