Author: scabanovich
Date: 2007-07-20 10:51:01 -0400 (Fri, 20 Jul 2007)
New Revision: 2557
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java
Log:
EXIN-86 NullPointerException prevented when registering missing resources.
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java 2007-07-20
14:50:46 UTC (rev 2556)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java 2007-07-20
14:51:01 UTC (rev 2557)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.hibernate.xml.model;
-import org.eclipse.core.runtime.FileLocator;
import org.jboss.tools.common.model.loaders.EntityRecognizer;
import org.jboss.tools.common.xml.XMLEntityResolver;
@@ -18,20 +17,16 @@
static {
try {
XMLEntityResolver.registerPublicEntity(
- HibernateConstants.DOC_PUBLICID_3_0,
- FileLocator.resolve(HibernateRecognizer.class.getResource("/meta/hibernate-mapping-3.0.dtd")).toString()
+ HibernateConstants.DOC_PUBLICID_3_0, HibernateRecognizer.class,
"/meta/hibernate-mapping-3.0.dtd"
);
XMLEntityResolver.registerSystemEntity(
- HibernateConstants.DOC_SYSTEMID_3_0,
- FileLocator.resolve(HibernateRecognizer.class.getResource("/meta/hibernate-mapping-3.0.dtd")).toString()
+ HibernateConstants.DOC_SYSTEMID_3_0, HibernateRecognizer.class,
"/meta/hibernate-mapping-3.0.dtd"
);
XMLEntityResolver.registerPublicEntity(
- HibernateConstants.CFG_DOC_PUBLICID_3_0,
- FileLocator.resolve(HibernateRecognizer.class.getResource("/meta/hibernate-configuration-3.0.dtd")).toString()
+ HibernateConstants.CFG_DOC_PUBLICID_3_0, HibernateRecognizer.class,
"/meta/hibernate-configuration-3.0.dtd"
);
XMLEntityResolver.registerSystemEntity(
- HibernateConstants.CFG_DOC_SYSTEMID_3_0,
- FileLocator.resolve(HibernateRecognizer.class.getResource("/meta/hibernate-configuration-3.0.dtd")).toString()
+ HibernateConstants.CFG_DOC_SYSTEMID_3_0, HibernateRecognizer.class,
"/meta/hibernate-configuration-3.0.dtd"
);
} catch (Exception e) {}
}
Show replies by date