From 64df835f6ccad643c9c28e3aa80455e294b46c6d Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 21 Mar 2012 14:15:36 +0100 Subject: [PATCH] correctly retrieve dom children for elements with no tag --- .../util/xml/impl/CollectionChildDescriptionImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xml/dom-impl/src/com/intellij/util/xml/impl/CollectionChildDescriptionImpl.java b/xml/dom-impl/src/com/intellij/util/xml/impl/CollectionChildDescriptionImpl.java index 8e11fa4e8e41..022bbc4151d7 100644 --- a/xml/dom-impl/src/com/intellij/util/xml/impl/CollectionChildDescriptionImpl.java +++ b/xml/dom-impl/src/com/intellij/util/xml/impl/CollectionChildDescriptionImpl.java @@ -17,6 +17,7 @@ import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Type; import java.util.Collection; +import java.util.Collections; import java.util.List; /** @@ -27,7 +28,11 @@ public class CollectionChildDescriptionImpl extends DomChildDescriptionImpl impl private final NotNullFunction> myTagsGetter = new NotNullFunction>() { @NotNull public List fun(final DomInvocationHandler handler) { - return DomImplUtil.findSubTags(handler.getXmlTag(), handler.createEvaluatedXmlName(getXmlName()), handler.getFile()); + XmlTag tag = handler.getXmlTag(); + if (tag == null) { + return Collections.emptyList(); + } + return DomImplUtil.findSubTags(tag, handler.createEvaluatedXmlName(getXmlName()), handler.getFile()); } };