public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: Fix RunnerProcess.removeSecurityManager()
@ 2006-06-27 15:18 Gary Benson
  0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2006-06-27 15:18 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Hi all,

This commit fixes RunnerProcess.removeSecurityManager() to use the new
test security manager rather than the old one.  I also added a warning
message if it does find stray test security managers installed.

Cheers,
Gary

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1356 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1743
diff -u -r1.1743 ChangeLog
--- ChangeLog	27 Jun 2006 12:23:37 -0000	1.1743
+++ ChangeLog	27 Jun 2006 15:13:25 -0000
@@ -1,3 +1,7 @@
+2006-06-27  Gary Benson  <gbenson@redhat.com>
+
+	* RunnerProcess.java (removeSecurityManager): Updated.
+
 2006-06-27  Gary Benson  <gbenson@redhat.com>
 
 	* gnu/testlet/TestSecurityManager.java: Replaced with a
Index: RunnerProcess.java
===================================================================
RCS file: /cvs/mauve/mauve/RunnerProcess.java,v
retrieving revision 1.8
diff -u -r1.8 RunnerProcess.java
--- RunnerProcess.java	19 Jun 2006 22:07:37 -0000	1.8
+++ RunnerProcess.java	27 Jun 2006 15:13:25 -0000
@@ -743,12 +743,13 @@
 
   private void removeSecurityManager()
   {
-    SecurityManager m = System.getSecurityManager();
-    if (m instanceof TestSecurityManager)
+    while (true)
       {
-        TestSecurityManager tsm = (TestSecurityManager) m;
-        tsm.setRunChecks(false);
-        System.setSecurityManager(null);
+	SecurityManager sm = System.getSecurityManager();
+	if (!(sm instanceof TestSecurityManager))
+	  break;
+	debug("warning: TestSecurityManager was not uninstalled");
+	((TestSecurityManager) sm).uninstall();
       }
   }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-27 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27 15:18 FYI: Fix RunnerProcess.removeSecurityManager() Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).