Author: scabanovich
Date: 2009-10-21 06:42:20 -0400 (Wed, 21 Oct 2009)
New Revision: 18200
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5051
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2009-10-21
10:06:10 UTC (rev 18199)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2009-10-21
10:42:20 UTC (rev 18200)
@@ -164,7 +164,7 @@
if(!isForceLoadOn() && body.equals(getAsText())) return;
String entity =
getModel().getEntityRecognizer().getEntityName(getAttributeValue(XModelObjectConstants.ATTR_NAME_EXTENSION),
body);
- if(!entity.equals(getModelEntity().getName())) {
+ if(entity == null || !entity.equals(getModelEntity().getName())) {
String[] errors = (body.length() == 0) ? null : XMLUtil.getXMLErrors(new
java.io.StringReader(body), false);
if(errors == null || errors.length == 0) errors = new String[]{"Doctype has been
changed. Please save file for the change to take effect in object model. :0:0"};
setErrors(body, errors);