Oops; fixing NPE caused by previous short-circuiting.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@563664 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2007-08-07 21:32:06 +00:00
parent fa39addf82
commit d260d34d69
1 changed files with 8 additions and 4 deletions

View File

@ -49,6 +49,8 @@ import org.apache.openjpa.persistence.xmlmapping.entities.Customer.CreditRating;
public class TestXMLCustomerOrder
extends SQLListenerTestCase {
private boolean enabled = false;
public void setUp() {
OpenJPAEntityManagerFactory emf = createEMF();
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration())
@ -58,6 +60,8 @@ public class TestXMLCustomerOrder
if (!dict.supportsXMLColumn)
return;
enabled = true;
setUp(org.apache.openjpa.persistence.xmlmapping.entities.Customer.class
, org.apache.openjpa.persistence.xmlmapping.entities.Customer
.CustomerKey.class
@ -71,15 +75,15 @@ public class TestXMLCustomerOrder
}
public void testXMLCustomerOrder() {
// skip if dictionary has no support for XML column type
if (!enabled)
return;
OpenJPAEntityManager em =
OpenJPAPersistence.cast(emf.createEntityManager());
DBDictionary dict = ((JDBCConfiguration) em.getConfiguration())
.getDBDictionaryInstance();
// skip if dictionary has no support for XML column type
if (!dict.supportsXMLColumn)
return;
String sqllog = TestXMLCustomerOrder.class.getName();
sqllog = sqllog.replace('.', '/');
sqllog = "./" + sqllog;