|
31 | 31 | public class CausedIOException extends IOException { |
32 | 32 |
|
33 | 33 | /** |
34 | | - * Default serial version UID. |
| 34 | + * Defines the serial version UID. |
35 | 35 | */ |
36 | 36 | private static final long serialVersionUID = 1L; |
37 | 37 |
|
38 | 38 | /** |
39 | | - * Constructs a new instance with the specified detail message and cause. |
| 39 | + * Constructs a new instance with the given message and cause. |
40 | 40 | * <p> |
41 | | - * Note that the detail message associated with <code>cause</code> is <i>not</i> automatically incorporated in |
42 | | - * this throwable's detail message. |
| 41 | + * As specified in {@link Throwable}, the message in the given <code>cause</code> is not used in this instance's |
| 42 | + * message. |
43 | 43 | * </p> |
44 | 44 | * |
45 | 45 | * @param message |
46 | | - * the detail message (which is saved for later retrieval by the {@link #getMessage()} method). |
| 46 | + * the message (see {@link #getMessage()}) |
47 | 47 | * @param cause |
48 | | - * the cause (which is saved for later retrieval by the {@link #getCause()} method). (A <code>null</code> |
49 | | - * value is permitted, and indicates that the cause is nonexistent or unknown.) |
| 48 | + * the cause (see {@link #getCause()}). A <code>null</code> value is allowed. |
50 | 49 | */ |
51 | 50 | public CausedIOException(String message, Throwable cause) { |
52 | 51 | super(message); |
53 | 52 | this.initCause(cause); |
54 | 53 | } |
55 | 54 |
|
56 | 55 | /** |
57 | | - * Constructs a new exception with the specified cause and a detail message. |
| 56 | + * Constructs a new instance with the given cause. |
58 | 57 | * <p> |
59 | | - * The message is <code>(cause==null ? null : cause.toString())</code> (which typically contains the class and |
60 | | - * detail message of <code>cause</code>). This constructor is useful for exceptions that are little more than |
61 | | - * wrappers for other throwables (for example, {@link java.security.PrivilegedActionException}). |
| 58 | + * The message is set to <code>cause==null ? null : cause.toString()</code>, which by default contains the class |
| 59 | + * and message of <code>cause</code>. This constructor is useful for call sites that just wrap another throwable. |
62 | 60 | * </p> |
63 | 61 | * |
64 | 62 | * @param cause |
65 | | - * the cause (which is saved for later retrieval by the {@link #getCause()} method). (A <code>null</code> |
66 | | - * value is permitted, and indicates that the cause is nonexistent or unknown.) |
| 63 | + * the cause (see {@link #getCause()}). A <code>null</code> value is allowed. |
67 | 64 | */ |
68 | 65 | public CausedIOException(Throwable cause) { |
69 | 66 | super(cause == null ? null : cause.toString()); |
|
0 commit comments