提交 b6959322 编写于 作者: A aefimov

8134111: Unmarshaller unmarshalls XML element which doesn't have the expected namespace

Reviewed-by: lancea
上级 86acc925
......@@ -231,22 +231,11 @@ public final class StructureLoader extends Loader {
@Override
public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException {
ChildLoader child = childUnmarshallers.get(arg.uri,arg.local);
if(child==null) {
if ((beanInfo != null) && (beanInfo.getTypeNames() != null)) {
Iterator typeNamesIt = beanInfo.getTypeNames().iterator();
QName parentQName = null;
if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) {
parentQName = (QName) typeNamesIt.next();
String parentUri = parentQName.getNamespaceURI();
child = childUnmarshallers.get(parentUri, arg.local);
}
}
if (child == null) {
child = catchAll;
if(child==null) {
super.childElement(state,arg);
return;
}
if (child == null) {
child = catchAll;
if (child==null) {
super.childElement(state,arg);
return;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册