[jboss-cvs] JBossAS SVN: r73615 - projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 23 09:05:47 EDT 2008


Author: alesj
Date: 2008-05-23 09:05:47 -0400 (Fri, 23 May 2008)
New Revision: 73615

Modified:
   projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java
Log:
Suspend SM, since that's not the purpose of this test.

Modified: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java	2008-05-23 12:45:21 UTC (rev 73614)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java	2008-05-23 13:05:47 UTC (rev 73615)
@@ -73,14 +73,22 @@
 
    public void testFieldAccess() throws Throwable
    {
-      testAccessBean("private");
-      testAccessBean("protected");
-      testAccessBean("public");
+      SecurityManager sm = suspendSecurity();
+      try
+      {
+         testAccessBean("private");
+         testAccessBean("protected");
+         testAccessBean("public");
 
-      // this should fail or something :-) on proxy
-      AccessBean pb = getBean("public", AccessBean.class);
-      assertEquals("foobar", pb.pubString);
-      AbstractTypeTestDelegate.Type type = getType("public");
-      assertTrue(pb.getPubString() == null || type != AbstractTypeTestDelegate.Type.PROXY);
+         // this should fail or something :-) on proxy
+         AccessBean pb = getBean("public", AccessBean.class);
+         assertEquals("foobar", pb.pubString);
+         AbstractTypeTestDelegate.Type type = getType("public");
+         assertTrue(pb.getPubString() == null || type != AbstractTypeTestDelegate.Type.PROXY);
+      }
+      finally
+      {
+         resumeSecurity(sm);
+      }
    }
 }




More information about the jboss-cvs-commits mailing list