mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Verify that two-dimensional object arrays have the correct component type
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
0ca8601777
commit
6f64e3aaab
@ -67,5 +67,10 @@ public class Reflection {
|
|||||||
|
|
||||||
expect(7.0 == (Double) Reflection.class.getMethod
|
expect(7.0 == (Double) Reflection.class.getMethod
|
||||||
("doubleMethod").invoke(null));
|
("doubleMethod").invoke(null));
|
||||||
|
|
||||||
|
Class[][] array = new Class[][] { { Class.class } };
|
||||||
|
expect("[Ljava.lang.Class;".equals(array[0].getClass().getName()));
|
||||||
|
expect(Class[].class == array[0].getClass());
|
||||||
|
expect(array.getClass().getComponentType() == array[0].getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user