This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

FYI: Patch: java.lang.SecurityManager


Hi list,


I wrote the attached patch to make it possible to use a SecurityManager 
with apps using AWT/Swing. This is e.g. needed for my plugin ...

Okay to commit to trunk ?

Graydon: Can this go into java-gui-branch too ?


Michael


2004-04-01  Michael Koch  <konqueror@gmx.de>

	* java/lang/SecurityManager.java
	(checkAwtEventQueueAccess): Implemented.

Index: java/lang/SecurityManager.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/SecurityManager.java,v
retrieving revision 1.9
diff -u -r1.9 SecurityManager.java
--- java/lang/SecurityManager.java	6 Jan 2004 08:34:58 -0000	1.9
+++ java/lang/SecurityManager.java	1 Apr 2004 13:00:11 -0000
@@ -861,8 +861,7 @@
    */
   public void checkAwtEventQueueAccess()
   {
-    // Should be: checkPermission(new AWTPermission("accessEventQueue"));
-    throw new SecurityException("Cannot access the AWT event queue.");
+    checkPermission(new AWTPermission("accessEventQueue"));
   }
 
   /**

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