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...


Jeroen Frijters wrote:

I ran into this problem as well and I'm committing the attached patch to solve this.

Regards,
Jeroen

2005-01-31 Jeroen Frijters <jeroen@frijters.net>

        * gnu/testlet/java/lang/Thread/security10.java:
        Added code to save and restore security manager.



Still not quite right. I just committed this:


2005-02-02  David Daney <ddaney@avtrex.com>
	* gnu/testlet/java/lang/Thread/security10.java:
	Allow setSecurityManager.

Index: security10.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/security10.java,v
retrieving revision 1.2
diff -c -p -r1.2 security10.java
*** security10.java     31 Jan 2005 11:26:16 -0000      1.2
--- security10.java     2 Feb 2005 18:17:43 -0000
***************
*** 1,6 ****
  // Tags: JDK1.0

! // Copyright (C) 2004 Free Software Foundation, Inc.
  // Written by Michael Koch (konqueror@gmx.de)

  // This file is part of Mauve.
--- 1,6 ----
  // Tags: JDK1.0

! // Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  // Written by Michael Koch (konqueror@gmx.de)

  // This file is part of Mauve.
*************** package gnu.testlet.java.lang.Thread;
*** 24,29 ****
--- 24,30 ----

  import gnu.testlet.Testlet;
  import gnu.testlet.TestHarness;
+ import java.security.Permission;

  public class security10 implements Testlet
  {
*************** public class security10 implements Testl
*** 33,38 ****
--- 34,47 ----
      {
        throw new SecurityException();
      }
+
+     public void checkPermission(Permission perm)
+     {
+       RuntimePermission p = new RuntimePermission("setSecurityManager");
+       if (p.implies(perm))
+         return;
+       super.checkPermission(perm);
+     }
    }

public void test (TestHarness h)


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