}
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));
}