-
Bug
-
Resolution: Fixed
-
Neutral
-
5.4.1
-
None
-
None
-
-
Empty show more show less
-
Basel 12
-
8
Given the following *wrong* YAML fragment for a sample AvailabilityDefinition:
availability: nodeTypes: - mgnl-folder: mgnl:folder
* The above is wrong because nodeTypes expects a list of strings, not maps.
When Map2BeanTransformer processes the "erroneous" YAML, It wrongly creates a collection containing maps, regardless of the generic type in the bean method signature.
Therefore, iterating over this collection will throw a ClassCastException.
Map2Bean should ignore entries which don't match the bean method's generic type, and warn accordingly.
See also
Collection<String> getNodeTypes()
Side note #1:
The issue arose with a wrong YAML app descriptor, which was produced by the Download as YAML action.
See the corresponding JCR bootstrap file on git.
Side note #2:
Correct YAML fragment would be:
availability: nodeTypes: - mgnl:product
- is causing
-
DOCU-617 NodeType Config in Yaml want's a collection of Strings
- Closed
- relates to
-
MAGNOLIA-6386 App definitions downloaded as yaml result in incorrect yaml definition
- Closed
-
MAGNOLIA-6178 Add support for Map format in YAML files for definitions that expect a List
- Closed