src/java.base/share/classes/java/lang/Thread.java
changeset 58872 ca70299778b9
parent 58779 2ba609bf43bb
child 58901 2700c409ff10
--- a/src/java.base/share/classes/java/lang/Thread.java	Mon Oct 28 15:03:36 2019 +0100
+++ b/src/java.base/share/classes/java/lang/Thread.java	Thu Oct 31 16:45:58 2019 +0000
@@ -1251,20 +1251,20 @@
     }
 
     /**
-     * Counts the number of stack frames in this thread. The thread must
-     * be suspended.
+     * Throws {@code UnsupportedOperationException}.
+     *
+     * @return     nothing
      *
-     * @return     the number of stack frames in this thread.
-     * @throws     IllegalThreadStateException  if this thread is not
-     *             suspended.
-     * @deprecated The definition of this call depends on {@link #suspend},
-     *             which is deprecated.  Further, the results of this call
-     *             were never well-defined.
+     * @deprecated This method was originally designed to count the number of
+     *             stack frames but the results were never well-defined and it
+     *             depended on thread-suspension.
      *             This method is subject to removal in a future version of Java SE.
      * @see        StackWalker
      */
     @Deprecated(since="1.2", forRemoval=true)
-    public native int countStackFrames();
+    public int countStackFrames() {
+        throw new UnsupportedOperationException();
+    }
 
     /**
      * Waits at most {@code millis} milliseconds for this thread to