< prev index next >

test/java/lang/Class/GenericStringTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 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 >