Author: dgolovin
Date: 2010-04-15 20:37:54 -0400 (Thu, 15 Apr 2010)
New Revision: 21513
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1636 Code Review
fix errors in continuous build. org.jboss.tools.common.xml.SafeDocumentBuilderFactory was
removed because it is not required
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java 2010-04-16
00:06:02 UTC (rev 21512)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java 2010-04-16
00:37:54 UTC (rev 21513)
@@ -30,7 +30,10 @@
super.describe(contents, description);
contents.reset();
String text = FileUtil.readStream(contents);
- return describe(text, description);
+ if(!"".equals(text.trim())) {
+ return describe(text, description);
+ }
+ return INDETERMINATE;
}
public int describe(Reader contents, IContentDescription description) throws IOException
{
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java 2010-04-16
00:06:02 UTC (rev 21512)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java 2010-04-16
00:37:54 UTC (rev 21513)
@@ -32,7 +32,7 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.model.ui.ModelUIMessages;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
-import org.jboss.tools.common.xml.SafeDocumentBuilderFactory;
+import org.jboss.tools.common.xml.XMLUtilities;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -275,7 +275,7 @@
}
static class DocumentBuilderHolder {
- static private DocumentBuilder INSTANCE =
SafeDocumentBuilderFactory.createDocumentBuilder(false);
+ static private DocumentBuilder INSTANCE = XMLUtilities.createDocumentBuilder();
public static DocumentBuilder getInstance() {
return INSTANCE;