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 <[EMAIL PROTECTED]>
* 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")); }
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath