< prev index next >

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

Print this page

        

*** 1327,1341 **** } /** * Prints a stack trace of the current thread to the standard error stream. * This method is used only for debugging. - * - * @see Throwable#printStackTrace() */ public static void dumpStack() { ! new Exception("Stack trace").printStackTrace(); } /** * Marks this thread as either a {@linkplain #isDaemon daemon} thread * or a user thread. The Java Virtual Machine exits when the only --- 1327,1339 ---- } /** * Prints a stack trace of the current thread to the standard error stream. * This method is used only for debugging. */ public static void dumpStack() { ! StackStreamFactory.makeStackTrace().printStackTrace(System.err); } /** * Marks this thread as either a {@linkplain #isDaemon daemon} thread * or a user thread. The Java Virtual Machine exits when the only
*** 1554,1564 **** stackTrace = EMPTY_STACK_TRACE; } return stackTrace; } else { // Don't need JVM help for current thread ! return (new Exception()).getStackTrace(); } } /** * Returns a map of stack traces for all live threads. --- 1552,1562 ---- stackTrace = EMPTY_STACK_TRACE; } return stackTrace; } else { // Don't need JVM help for current thread ! return StackStreamFactory.makeStackTrace().getStackTraceElements(); } } /** * Returns a map of stack traces for all live threads.
< prev index next >