[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Patch: java/lang/SecurityManager.java
From: |
Dalibor Topic |
Subject: |
FYI: Patch: java/lang/SecurityManager.java |
Date: |
Fri, 09 Apr 2004 17:09:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316 |
Hi all,
I've committed the attached patch to clean up a direct use of an
internal field in java.lang.Thread instead of using the API method for
it. I've tried to improve the docs a little bit, too.
2004-04-09 Dalibor Topic <address@hidden>
* java/lang/SecurityManager.java: (checkAccess): Use
getThreadGroup(). Improved documentation.
cheers,
dalibor topic
Index: java/lang/SecurityManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/SecurityManager.java,v
retrieving revision 1.16
diff -u -r1.16 SecurityManager.java
--- java/lang/SecurityManager.java 6 Jan 2004 09:56:04 -0000 1.16
+++ java/lang/SecurityManager.java 8 Apr 2004 15:31:04 -0000
@@ -375,9 +375,9 @@
* <code>RuntimePermission("modifyThread")</code>, return silently, so that
* core classes (the Classpath library!) can modify any thread.
*
- * @param t the other Thread to check
+ * @param thread the other Thread to check
* @throws SecurityException if permission is denied
- * @throws NullPointerException if t is null
+ * @throws NullPointerException if thread is null
* @see Thread#stop()
* @see Thread#suspend()
* @see Thread#resume()
@@ -385,9 +385,10 @@
* @see Thread#setName(String)
* @see Thread#setDaemon(boolean)
*/
- public void checkAccess(Thread t)
+ public void checkAccess(Thread thread)
{
- if (t.group != null && t.group.getParent() != null)
+ if (thread.getThreadGroup() != null
+ && thread.getThreadGroup().getParent() != null)
checkPermission(new RuntimePermission("modifyThread"));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Patch: java/lang/SecurityManager.java,
Dalibor Topic <=