Skip to content

Commit

Permalink
Javadoc: Remove obsolete comments and clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jan 6, 2025
1 parent e55e2b7 commit 70ff24d
Showing 1 changed file with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,10 @@ static String[] getStackFrames(final String stackTrace) {
* {@link Throwable} object, decomposing it into a list of
* stack frames.
*
* <p>The result of this method vary by JDK version as this method
* <p>
* The result of this method vary by JDK version as this method
* uses {@link Throwable#printStackTrace(java.io.PrintWriter)}.
* On JDK1.3 and earlier, the cause exception will not be shown
* unless the specified throwable alters printStackTrace.</p>
* </p>
*
* @param throwable the {@link Throwable} to examine, may be null
* @return an array of strings describing each stack frame, never null
Expand All @@ -455,12 +455,12 @@ public static String[] getStackFrames(final Throwable throwable) {
}

/**
* Gets the stack trace from a Throwable as a String.
* Gets the stack trace from a Throwable as a String, including suppressed and cause exceptions.
*
* <p>The result of this method vary by JDK version as this method
* <p>
* The result of this method vary by JDK version as this method
* uses {@link Throwable#printStackTrace(java.io.PrintWriter)}.
* On JDK1.3 and earlier, the cause exception will not be shown
* unless the specified throwable alters printStackTrace.</p>
* </p>
*
* @param throwable the {@link Throwable} to be examined, may be null
* @return the stack trace as generated by the exception's
Expand Down Expand Up @@ -716,17 +716,19 @@ public static boolean isUnchecked(final Throwable throwable) {
/**
* Prints a compact stack trace for the root cause of a throwable
* to {@code System.err}.
*
* <p>The compact stack trace starts with the root cause and prints
* <p>
* The compact stack trace starts with the root cause and prints
* stack frames up to the place where it was caught and wrapped.
* Then it prints the wrapped exception and continues with stack frames
* until the wrapper exception is caught and wrapped again, etc.</p>
*
* <p>The output of this method is consistent across JDK versions.
* Note that this is the opposite order to the JDK1.4 display.</p>
*
* <p>The method is equivalent to {@code printStackTrace} for throwables
* that don't have nested causes.</p>
* until the wrapper exception is caught and wrapped again, etc.
* </p>
* <p>
* The output of this method is consistent across JDK versions.
* </p>
* <p>
* The method is equivalent to {@code printStackTrace} for throwables
* that don't have nested causes.
* </p>
*
* @param throwable the throwable to output
* @since 2.0
Expand Down

0 comments on commit 70ff24d

Please sign in to comment.