< prev index next >

test/java/lang/Class/GenericStringTest.java

Print this page

        

*** 21,31 **** * questions. */ /* * @test ! * @bug 6298888 6992705 * @summary Check Class.toGenericString() * @author Joseph D. Darcy */ import java.lang.reflect.*; --- 21,31 ---- * questions. */ /* * @test ! * @bug 6298888 6992705 8161500 * @summary Check Class.toGenericString() * @author Joseph D. Darcy */ import java.lang.reflect.*;
*** 56,74 **** // Type objects is being queried. failures += checkToGenericString(f.getType(), "java.util.Map<K,V>[]"); f = GenericStringTest.class.getDeclaredField("mixed2"); failures += checkToGenericString(f.getType(), "java.util.Map<K,V>[][]"); ! Class<?>[] types = { ! GenericStringTest.class, AnInterface.class, LocalMap.class, AnEnum.class, ! AnotherEnum.class, ! }; ! ! for(Class<?> clazz : types) { failures += checkToGenericString(clazz, clazz.getAnnotation(ExpectedGenericString.class).value()); } if (failures > 0) { throw new RuntimeException(); --- 56,70 ---- // Type objects is being queried. failures += checkToGenericString(f.getType(), "java.util.Map<K,V>[]"); f = GenericStringTest.class.getDeclaredField("mixed2"); failures += checkToGenericString(f.getType(), "java.util.Map<K,V>[][]"); ! for(Class<?> clazz : List.of(GenericStringTest.class, AnInterface.class, LocalMap.class, AnEnum.class, ! AnotherEnum.class)) { failures += checkToGenericString(clazz, clazz.getAnnotation(ExpectedGenericString.class).value()); } if (failures > 0) { throw new RuntimeException();
< prev index next >