Skip to content

Commit 82642b9

Browse files
author
Matthias Güdemann
committed
Add regression test for nil assigns in JSON trace
1 parent d299ea2 commit 82642b9

File tree

7 files changed

+41
-0
lines changed

7 files changed

+41
-0
lines changed
234 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.class
3+
--json-ui --trace
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
.*VERIFICATION FAILED.*
7+
--
8+
^warning: ignoring
9+
--
10+
this fails with assertion error if nil values are not allowed in assignments in
11+
the JSON trace
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class A extends Throwable {}
2+
class B extends A {}
3+
class C extends B {}
4+
class D extends C {}
5+
6+
public class test {
7+
public static void main (String arg[]) {
8+
try {
9+
D d = new D();
10+
C c = new C();
11+
B b = new B();
12+
A a = new A();
13+
A e = a;
14+
throw e;
15+
}
16+
catch(D exc) {
17+
assert false;
18+
}
19+
catch(C exc) {
20+
assert false;
21+
}
22+
catch(B exc) {
23+
assert false;
24+
}
25+
catch(A exc) {
26+
assert false;
27+
}
28+
}
29+
}
30+

0 commit comments

Comments
 (0)