IDEA-89080 (Unable to open a maven project)

This commit is contained in:
Sergey Evdokimov
2012-07-23 15:03:24 +04:00
parent 3e5f3a7780
commit a8578fada7
@@ -25,6 +25,7 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.impl.source.parsing.xml.XmlBuilder;
import com.intellij.psi.impl.source.parsing.xml.XmlBuilderDriver;
import org.jdom.Element;
import org.jdom.IllegalNameException;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
@@ -76,7 +77,13 @@ public class MavenJDOMUtil {
String name = localName.toString();
if (StringUtil.isEmptyOrSpaces(name)) return ProcessingOrder.TAGS;
Element newElement = new Element(name);
Element newElement;
try {
newElement = new Element(name);
}
catch (IllegalNameException e) {
newElement = new Element("invalidName");
}
Element parent = stack.isEmpty() ? null : stack.getLast();
if (parent == null) {