Fixes issue 12690: Changed the way of loading the classes
authorIván Perdomo <ivan.perdomo@openbravo.com>
Mon, 31 May 2010 18:47:09 +0200
changeset 7454 2c4cf1d57766
parent 7453 a28a0b6574ec
child 7457 703e25df1630
Fixes issue 12690: Changed the way of loading the classes
src-test/org/openbravo/test/AllQuickAntTaskTests.java
src-test/org/openbravo/test/model/ClassLoaderTest.java
--- a/src-test/org/openbravo/test/AllQuickAntTaskTests.java	Mon May 31 16:33:18 2010 +0200
+++ b/src-test/org/openbravo/test/AllQuickAntTaskTests.java	Mon May 31 18:47:09 2010 +0200
@@ -29,6 +29,7 @@
 import org.openbravo.test.dal.DalUtilTest;
 import org.openbravo.test.dal.OBContextTest;
 import org.openbravo.test.dal.ValidationTest;
+import org.openbravo.test.model.ClassLoaderTest;
 import org.openbravo.test.model.UniqueConstraintTest;
 import org.openbravo.test.modularity.DBPrefixTest;
 import org.openbravo.test.preference.PreferenceTest;
@@ -88,6 +89,7 @@
     // suite.addTestSuite(RuntimeModelTest.class);
     // suite.addTestSuite(OneToManyTest.class);
     suite.addTestSuite(UniqueConstraintTest.class);
+    suite.addTestSuite(ClassLoaderTest.class);
 
     // modularity
     // suite.addTestSuite(DatasetServiceTest.class);
--- a/src-test/org/openbravo/test/model/ClassLoaderTest.java	Mon May 31 16:33:18 2010 +0200
+++ b/src-test/org/openbravo/test/model/ClassLoaderTest.java	Mon May 31 18:47:09 2010 +0200
@@ -72,7 +72,7 @@
         }
 
         // Testing if the defined class can be loaded
-        ClassLoader.getSystemClassLoader().loadClass(mi.getJavaClassName());
+        Class.forName(mi.getJavaClassName());
 
       } catch (ClassNotFoundException e) {
         notFoundClasses.add(mi.getId() + " : " + mi.getJavaClassName());