mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8210721: Replace legacy serial exception field with Throwable::cause
Reviewed-by: dfuchs, lancea
This commit is contained in:
parent
b27f471bdd
commit
b72ab42e49
9 changed files with 486 additions and 108 deletions
|
@ -466,6 +466,16 @@ public class Throwable implements Serializable {
|
|||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is called by readObject of a few exceptions such as
|
||||
* ClassNotFoundException and ExceptionInInitializerError to deserialize
|
||||
* a stream output from an older runtime version where the cause may
|
||||
* have set to null.
|
||||
*/
|
||||
final void setCause(Throwable t) {
|
||||
this.cause = t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a short description of this throwable.
|
||||
* The result is the concatenation of:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue