Package org.jboss.test.classinfo.support

Examples of org.jboss.test.classinfo.support.ErrorHolderThread


            {
               throw new RuntimeException(t);
            }
         }
      };
      ErrorHolderThread other = new ErrorHolderThread(runnable);
      other.start();
      other.join();
      // we should get an error here
      assertNotNull("Should get access restriction exception.", other.getError());
      RuntimeException re = assertInstanceOf(other.getError(), RuntimeException.class);
      Throwable cause = re.getCause();
      assertNotNull(cause);
      assertInstanceOf(cause, AccessControlException.class, false);
   }
View Full Code Here


      }
      catch (Throwable t)
      {
         assertInstanceOf(t, AccessControlException.class);
      }
      ErrorHolderThread other = new ErrorHolderThread(new Runnable()
      {
         public void run()
         {
            SecurityManager sm = suspendSecurity();
            try
            {
               set(priSet, tester, "foobar");
            }
            catch(Throwable t)
            {
               throw new RuntimeException(t);
            }
            finally
            {
               resumeSecurity(sm);
            }
         }
      });
      assertNull(getPrivateString(tester));
      other.start();
      other.join();
      assertNull(other.getError());
      assertEquals("foobar", getPrivateString(tester));
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.classinfo.support.ErrorHolderThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.