< prev index next >

## src/java.base/share/classes/java/lang/Thread.java

Print this page

    *** 1422,11 ***
    --- 1422,18 ---
           * throwing a {@code SecurityException}.
           *
           * @throws  SecurityException  if the current thread is not allowed to
           *          access this thread.
           * @see        SecurityManager#checkAccess(Thread)
    +      * @deprecated This method is only useful in conjunction with
    +      *       {@linkplain SecurityManager the Security Manager}, which is
    +      *       deprecated and subject to removal in a future release.
    +      *       Consequently, this method is also deprecated and subject to
    +      *       removal. There is no replacement for the Security Manager or this
    +      *       method.
           */
    +     @Deprecated(since="17", forRemoval=true)
          public final void checkAccess() {
              SecurityManager security = System.getSecurityManager();
              if (security != null) {
                  security.checkAccess(this);
              }

< prev index next >