--- old/test/java/lang/reflect/Method/GenericStringTest.java 2016-07-15 16:35:55.119377068 -0700 +++ new/test/java/lang/reflect/Method/GenericStringTest.java 2016-07-15 16:35:54.987377063 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 5033583 6316717 6470106 8004979 + * @bug 5033583 6316717 6470106 8004979 8161500 * @summary Check toGenericString() and toString() methods * @author Joseph D. Darcy */ @@ -35,14 +35,9 @@ public class GenericStringTest { public static void main(String argv[]) throws Exception { int failures = 0; - List> classList = new LinkedList>(); - classList.add(TestClass1.class); - classList.add(TestClass2.class); - classList.add(Roebling.class); - classList.add(TestInterface1.class); - - for(Class clazz: classList) + for(Class clazz: List.of(TestClass1.class, TestClass2.class, + Roebling.class, TestInterface1.class)) for(Method method: clazz.getDeclaredMethods()) { ExpectedGenericString egs = method.getAnnotation(ExpectedGenericString.class); if (egs != null) { @@ -121,6 +116,30 @@ @ExpectedGenericString( "public void TestClass2.method2() throws F") public void method2() throws F {return;} + + @ExpectedGenericString( + "public E[] TestClass2.method3()") + public E[] method3() {return null;} + + @ExpectedGenericString( + "public E[][] TestClass2.method4()") + public E[][] method4() {return null;} + + @ExpectedGenericString( + "public java.util.List TestClass2.method5()") + public List method5() {return null;} + + @ExpectedGenericString( + "public java.util.List TestClass2.method6()") + public List method6() {return null;} + + @ExpectedGenericString( + "public java.util.List[] TestClass2.method7()") + public List[] method7() {return null;} + + @ExpectedGenericString( + "public java.util.Map TestClass2.method8()") + public Map method8() {return null;} } class Roebling implements Comparable { @@ -157,7 +176,6 @@ @ExpectedGenericString( "public default strictfp double TestInterface1.quux()") strictfp default double quux(){return 1.0;} - } @Retention(RetentionPolicy.RUNTIME)