mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 13:04:33 +02:00
7110700: Enhance exception throwing mechanism in ObjectStreamClass
Reviewed-by: dmeetry, hawtin
This commit is contained in:
parent
159d2cd692
commit
d6e13af09c
2 changed files with 44 additions and 29 deletions
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
/* @test
|
||||
* @bug 6317435
|
||||
* @bug 6317435 7068148
|
||||
* @summary Verify that stack trace contains a proper cause of
|
||||
* InvalidClassException (methods: checkSerialize,
|
||||
* checkDeserialize or checkDefaultSerialize)
|
||||
|
@ -59,7 +59,7 @@ public class ExpectedStackTrace {
|
|||
private static final String SER_METHOD_NAME = "checkSerializable";
|
||||
|
||||
public static final void main(String[] args) throws Exception {
|
||||
System.err.println("\nRegression test for CR6317435");
|
||||
System.err.println("\nRegression test for CRs 6317435, 7068148");
|
||||
checkSerializable(getObject());
|
||||
}
|
||||
|
||||
|
@ -99,9 +99,11 @@ public class ExpectedStackTrace {
|
|||
}
|
||||
}
|
||||
if (found) {
|
||||
System.err.println("\nTEST PASSED");
|
||||
if (ex.getCause() != null) {
|
||||
throw new Error("\nTest for CR 7068148 FAILED");
|
||||
}
|
||||
} else {
|
||||
throw new Error();
|
||||
throw new Error("\nTest for CR 6317435 FAILED");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue