[Jboss-cvs] JBossAS SVN: r56881 - branches/Branch_4_0/testsuite/src/main/org/jboss/test/classloader/test

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 15 02:11:03 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-09-15 02:11:01 -0400 (Fri, 15 Sep 2006)
New Revision: 56881

Modified:
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/classloader/test/BasicLoaderUnitTestCase.java
Log:
JBAS-3494, don't rely on getMethods() attempting to load all classes in the method signatures.

Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/classloader/test/BasicLoaderUnitTestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/classloader/test/BasicLoaderUnitTestCase.java	2006-09-15 05:37:25 UTC (rev 56880)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/classloader/test/BasicLoaderUnitTestCase.java	2006-09-15 06:11:01 UTC (rev 56881)
@@ -24,6 +24,7 @@
 import java.io.File;
 import java.net.URL;
 import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
@@ -98,14 +99,18 @@
       File cwd = new File(jbosstestDeployDir);
       URL cp = new URL(cwd.toURL(), "../classes");
       log.info("Using cp: " + cp);
+      File bakFile = ClassMover.move("org.jboss.test.classloader.test.ex.BaseException");
       ClassLoader loader = ulr.newClassLoader(cp, true);
 
-      File bakFile = null;
       try
       {
-         bakFile = ClassMover.move("org.jboss.test.classloader.test.ex.BaseException");
          Class c = loader.loadClass("org.jboss.test.classloader.test.ex.ExThrower");
-         c.getMethods();
+         Method[] methods = c.getMethods();
+         for(int n = 0; n < methods.length; n ++)
+         {
+            Method m = methods[n];
+            m.getExceptionTypes();
+         }
          fail("Should not have gotten ExThrower methods");
       }
       catch (NoClassDefFoundError e)




More information about the jboss-cvs-commits mailing list