I am pushing my own test event queue over the System eventqueue. And in TestEQueue I have over loaded the dispatchEvent method with one call to super.dispatchEvent
TestEQueue mytestqueue = new TestEQueue();
Toolkit.getDefaultToolkit().getSystemEventQueue().push(TestEQueue);
But for some reason dispatching in the new TestQueue fails with AccessControlException. Where as the same event is successfully dispatched in the main program without TestEQueue.
How can this be possible as both the queues will running in the same thread group? How can I debug this issue? This is part of a very large test codebase, so I am not able to copy the functional code. Can this be related to security manager?