This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: java.lang.SecurityManager
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Cc: graydon hoare <graydon at redhat dot com>
- Date: Thu, 1 Apr 2004 15:03:13 +0200
- Subject: 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"));
}
/**