Respect <description> within <entry> per beans XSD

Prior to this change, a parsing exception would be thrown if a
<description> element was placed within a <map><entry/></map>
element. The beans XSD has always permitted this arrangement,
but BeanDefinitionParserDelegate did not respect it. The latter now
simply ignores any <description> element, rather than failing.

Issue: SPR-8563
This commit is contained in:
Chris Beams
2011-07-28 02:21:22 +00:00
parent f432f3043f
commit 226256e264
2 changed files with 16 additions and 1 deletions

View File

@@ -1255,7 +1255,10 @@ public class BeanDefinitionParserDelegate {
}
else {
// Child element is what we're looking for.
if (valueEle != null) {
if (nodeNameEquals(candidateEle, DESCRIPTION_ELEMENT)) {
// the element is a <description> -> ignore it
}
else if (valueEle != null) {
error("<entry> element must not contain more than one value sub-element", entryEle);
}
else {