Make all exception classes immutable

Update all exception classes so that they are fully immutable and cannot
be changed once they have been thrown.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-27 10:01:32 -07:00
committed by Rob Winch
parent a0b9442265
commit 81fe9fc640
5 changed files with 20 additions and 36 deletions

View File

@@ -250,12 +250,12 @@ public class ThrowableAnalyzerTests {
}
/**
* Exception for testing purposes. The cause is not retrievable by {@link #getCause()}
* .
* Exception for testing purposes. The cause is not retrievable by
* {@link #getCause()}.
*/
public static final class NonStandardException extends Exception {
private Throwable cause;
private final Throwable cause;
public NonStandardException(String message, Throwable cause) {
super(message);