Skip to content

Commit 9c457b7

Browse files
author
Matthias Güdemann
committed
Add regression test for null instanceof.
1 parent 2080cd3 commit 9c457b7

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed
716 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
public class InstanceOf8 {
2+
public static boolean test(Integer i) {
3+
if (i instanceof Integer) {
4+
return true;
5+
} else {
6+
return false;
7+
}
8+
}
9+
public static void main(String[] args)
10+
{
11+
assert(!test(null));
12+
assert(test(new Integer(1)));
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
InstanceOf8.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--

0 commit comments

Comments
 (0)