mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8264148: Update spec for exceptions retrofitted for exception chaining
Reviewed-by: rriggs, smarks
This commit is contained in:
parent
353807c5f1
commit
815248ab27
22 changed files with 40 additions and 76 deletions
|
@ -1193,7 +1193,7 @@ public class ObjectStreamClass implements Serializable {
|
|||
try {
|
||||
writeObjectMethod.invoke(obj, new Object[]{ out });
|
||||
} catch (InvocationTargetException ex) {
|
||||
Throwable th = ex.getTargetException();
|
||||
Throwable th = ex.getCause();
|
||||
if (th instanceof IOException) {
|
||||
throw (IOException) th;
|
||||
} else {
|
||||
|
@ -1223,7 +1223,7 @@ public class ObjectStreamClass implements Serializable {
|
|||
try {
|
||||
readObjectMethod.invoke(obj, new Object[]{ in });
|
||||
} catch (InvocationTargetException ex) {
|
||||
Throwable th = ex.getTargetException();
|
||||
Throwable th = ex.getCause();
|
||||
if (th instanceof ClassNotFoundException) {
|
||||
throw (ClassNotFoundException) th;
|
||||
} else if (th instanceof IOException) {
|
||||
|
@ -1254,7 +1254,7 @@ public class ObjectStreamClass implements Serializable {
|
|||
try {
|
||||
readObjectNoDataMethod.invoke(obj, (Object[]) null);
|
||||
} catch (InvocationTargetException ex) {
|
||||
Throwable th = ex.getTargetException();
|
||||
Throwable th = ex.getCause();
|
||||
if (th instanceof ObjectStreamException) {
|
||||
throw (ObjectStreamException) th;
|
||||
} else {
|
||||
|
@ -1283,7 +1283,7 @@ public class ObjectStreamClass implements Serializable {
|
|||
try {
|
||||
return writeReplaceMethod.invoke(obj, (Object[]) null);
|
||||
} catch (InvocationTargetException ex) {
|
||||
Throwable th = ex.getTargetException();
|
||||
Throwable th = ex.getCause();
|
||||
if (th instanceof ObjectStreamException) {
|
||||
throw (ObjectStreamException) th;
|
||||
} else {
|
||||
|
@ -1313,7 +1313,7 @@ public class ObjectStreamClass implements Serializable {
|
|||
try {
|
||||
return readResolveMethod.invoke(obj, (Object[]) null);
|
||||
} catch (InvocationTargetException ex) {
|
||||
Throwable th = ex.getTargetException();
|
||||
Throwable th = ex.getCause();
|
||||
if (th instanceof ObjectStreamException) {
|
||||
throw (ObjectStreamException) th;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue