< prev index next >

src/java.base/share/classes/java/lang/SecurityManager.java

Print this page

1526      *
1527      * @since   1.1
1528      * @see        #checkPermission(java.security.Permission) checkPermission
1529      */
1530     public void checkSecurityAccess(String target) {
1531         checkPermission(new SecurityPermission(target));
1532     }
1533 
1534     /**
1535      * Returns the thread group into which to instantiate any new
1536      * thread being created at the time this is being called.
1537      * By default, it returns the thread group of the current
1538      * thread. This should be overridden by a specific security
1539      * manager to return the appropriate thread group.
1540      *
1541      * @return  ThreadGroup that new threads are instantiated into
1542      * @since   1.1
1543      * @see     java.lang.ThreadGroup
1544      */
1545     public ThreadGroup getThreadGroup() {
1546         return Thread.currentThread().getThreadGroup();
1547     }
1548 
1549 }

1526      *
1527      * @since   1.1
1528      * @see        #checkPermission(java.security.Permission) checkPermission
1529      */
1530     public void checkSecurityAccess(String target) {
1531         checkPermission(new SecurityPermission(target));
1532     }
1533 
1534     /**
1535      * Returns the thread group into which to instantiate any new
1536      * thread being created at the time this is being called.
1537      * By default, it returns the thread group of the current
1538      * thread. This should be overridden by a specific security
1539      * manager to return the appropriate thread group.
1540      *
1541      * @return  ThreadGroup that new threads are instantiated into
1542      * @since   1.1
1543      * @see     java.lang.ThreadGroup
1544      */
1545     public ThreadGroup getThreadGroup() {
1546         return Thread.getCurrentThreadGroup();
1547     }
1548 
1549 }
< prev index next >