src/java.base/share/classes/java/lang/Thread.java
changeset 58872 ca70299778b9
parent 58779 2ba609bf43bb
child 58901 2700c409ff10
equal deleted inserted replaced
58871:27c2d2a4b695 58872:ca70299778b9
  1249     public static int enumerate(Thread tarray[]) {
  1249     public static int enumerate(Thread tarray[]) {
  1250         return currentThread().getThreadGroup().enumerate(tarray);
  1250         return currentThread().getThreadGroup().enumerate(tarray);
  1251     }
  1251     }
  1252 
  1252 
  1253     /**
  1253     /**
  1254      * Counts the number of stack frames in this thread. The thread must
  1254      * Throws {@code UnsupportedOperationException}.
  1255      * be suspended.
  1255      *
  1256      *
  1256      * @return     nothing
  1257      * @return     the number of stack frames in this thread.
  1257      *
  1258      * @throws     IllegalThreadStateException  if this thread is not
  1258      * @deprecated This method was originally designed to count the number of
  1259      *             suspended.
  1259      *             stack frames but the results were never well-defined and it
  1260      * @deprecated The definition of this call depends on {@link #suspend},
  1260      *             depended on thread-suspension.
  1261      *             which is deprecated.  Further, the results of this call
       
  1262      *             were never well-defined.
       
  1263      *             This method is subject to removal in a future version of Java SE.
  1261      *             This method is subject to removal in a future version of Java SE.
  1264      * @see        StackWalker
  1262      * @see        StackWalker
  1265      */
  1263      */
  1266     @Deprecated(since="1.2", forRemoval=true)
  1264     @Deprecated(since="1.2", forRemoval=true)
  1267     public native int countStackFrames();
  1265     public int countStackFrames() {
       
  1266         throw new UnsupportedOperationException();
       
  1267     }
  1268 
  1268 
  1269     /**
  1269     /**
  1270      * Waits at most {@code millis} milliseconds for this thread to
  1270      * Waits at most {@code millis} milliseconds for this thread to
  1271      * die. A timeout of {@code 0} means to wait forever.
  1271      * die. A timeout of {@code 0} means to wait forever.
  1272      *
  1272      *