Skip to content

Commit 25e1805

Browse files
committed
Javadoc enhancements for new CompositeException implementation (mostly formatting).
1 parent 581122a commit 25e1805

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

rxjava-core/src/main/java/rx/exceptions/CompositeException.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
import java.util.Set;
2727

2828
/**
29-
* Exception that is a composite of 1 or more other exceptions.
30-
* A CompositeException does not modify the structure of any exception it wraps, but at print-time
31-
* iterates through the list of contained Throwables to print them all.
29+
* An Exception that is a composite of one or more other Exceptions. A {@code CompositeException} does not
30+
* modify the structure of any exception it wraps, but at print-time it iterates through the list of
31+
* Throwables contained in the composit in order to print them all.
3232
*
33-
* Its invariant is to contains an immutable, ordered (by insertion order), unique list of non-composite exceptions.
34-
* This list may be queried by {@code #getExceptions()}
33+
* Its invariant is to contain an immutable, ordered (by insertion order), unique list of non-composite
34+
* exceptions. You can retrieve individual exceptions in this list with {@link #getExceptions()}.
3535
*
36-
* The `printStackTrace()` implementation does custom handling of the StackTrace instead of using `getCause()` so it
37-
* can avoid circular references.
36+
* The {@link #printStackTrace()} implementation handles the StackTrace in a customized way instead of using
37+
* {@code getCause()} so that it can avoid circular references.
3838
*
39-
* If `getCause()` is invoked, it will lazily create the causal chain but stop if it finds any Throwable in the chain
40-
* that it has already seen.
39+
* If you invoke {@link #getCause()}, it will lazily create the causal chain but will stop if it finds any
40+
* Throwable in the chain that it has already seen.
4141
*/
4242
public final class CompositeException extends RuntimeException {
4343

@@ -124,13 +124,14 @@ public synchronized Throwable getCause() {
124124
}
125125

126126
/**
127-
* All of the following printStackTrace functionality is derived from JDK Throwable printStackTrace.
128-
* In particular, the PrintStreamOrWriter abstraction is copied wholesale.
127+
* All of the following {@code printStackTrace} functionality is derived from JDK {@link Throwable}
128+
* {@code printStackTrace}. In particular, the {@code PrintStreamOrWriter} abstraction is copied wholesale.
129129
*
130-
* Changes from the official JDK implementation:
131-
* * No infinite loop detection
132-
* * Smaller critical section holding printStream lock
133-
* * Explicit knowledge about exceptions List that this loops through
130+
* Changes from the official JDK implementation:<ul>
131+
* <li>no infinite loop detection</li>
132+
* <li>smaller critical section holding {@link PrintStream} lock</li>
133+
* <li>explicit knowledge about the exceptions {@link List} that this loops through</li>
134+
* </ul>
134135
*/
135136
@Override
136137
public void printStackTrace() {
@@ -148,8 +149,8 @@ public void printStackTrace(PrintWriter s) {
148149
}
149150

150151
/**
151-
* Special handling for printing out a CompositeException
152-
* Loop through all inner exceptions and print them out
152+
* Special handling for printing out a {@code CompositeException}.
153+
* Loops through all inner exceptions and prints them out.
153154
*
154155
* @param s
155156
* stream to print to

0 commit comments

Comments
 (0)