This is the mail archive of the mauve-patches@sources.redhat.com mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gnu/testlet/java/lang/Thread/security10.java...


David Daney wrote:
Michael Koch wrote:

Am Dienstag, 18. Januar 2005 19:24 schrieb David Daney:


Causes:
Exception in thread "main" java.lang.SecurityException
        at
gnu.testlet.java.lang.Thread.security10$MySecurityManager.checkAcce
ss (security10.java:34)
        at java.lang.Thread.checkAccess(Thread.java:1124)
        at java.lang.Thread.setPriority(Thread.java:871)
        at java.lang.Thread.init(Thread.java:293)
        at java.lang.Thread.<init>(Thread.java:438)
        at java.lang.ref.Finalizer$1.run(Finalizer.java:112)
        at java.security.AccessController.doPrivileged(Native
Method) at
java.lang.ref.Finalizer.forkSecondaryFinalizer(Finalizer.java:121)
        at
java.lang.ref.Finalizer.runFinalization(Finalizer.java:126) at
java.lang.Runtime.runFinalization0(Native Method) at
java.lang.Runtime.runFinalization(Runtime.java:656) at
java.lang.System.runFinalization(System.java:759) at
gnu.testlet.SimpleTestHarness.runtest(SimpleTestHarness.java:232)
        at
gnu.testlet.SimpleTestHarness.main(SimpleTestHarness.java:421)

When run with Sun's jre.



which version of the JRE ? I used 1.4.2 and it passes the tests.



This is running on FC3 on i686


[daney@dl2 mauve]$ java -version
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

I have no default security policy installed that I am aware of. It could be an issue with security policies.


After further thought, it is not a security policy problem. Your security manager always throws SecurityException on any Thread method. Sun's jre is trying to create a new Thread when System.runFinalization() is called, and will always fail with your SecurityManager installed.


Perhaps you should save a reference to the original SecurityManager and restore it when the test is finished. That would leave the test harness in the same state after the Thread.security10 test as before.

David Daney.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]