From 6f64e3aaab775981c34d12cfccbe3f2020fd7eb8 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 25 Oct 2013 13:23:41 -0500 Subject: [PATCH] Verify that two-dimensional object arrays have the correct component type Signed-off-by: Johannes Schindelin --- test/Reflection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Reflection.java b/test/Reflection.java index f71b39e81b..23d34abf7e 100644 --- a/test/Reflection.java +++ b/test/Reflection.java @@ -67,5 +67,10 @@ public class Reflection { expect(7.0 == (Double) Reflection.class.getMethod ("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()); } }