equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 5033583 6316717 6470106 8161500 8162539 |
26 * @bug 5033583 6316717 6470106 8161500 8162539 6304578 |
27 * @summary Check toGenericString() and toString() methods |
27 * @summary Check toGenericString() and toString() methods |
28 * @author Joseph D. Darcy |
28 * @author Joseph D. Darcy |
29 */ |
29 */ |
30 |
30 |
31 import java.lang.reflect.*; |
31 import java.lang.reflect.*; |
85 @ExpectedString( |
85 @ExpectedString( |
86 "protected TestClass1(java.lang.Object,java.lang.Object) throws java.lang.Exception") |
86 "protected TestClass1(java.lang.Object,java.lang.Object) throws java.lang.Exception") |
87 protected <S, T> TestClass1(S s, T t) throws Exception{} |
87 protected <S, T> TestClass1(S s, T t) throws Exception{} |
88 |
88 |
89 @ExpectedGenericString( |
89 @ExpectedGenericString( |
90 "<E> TestClass1() throws E") |
90 "protected <V extends java.lang.Number & java.lang.Runnable> TestClass1(V)") |
|
91 @ExpectedString( |
|
92 "protected TestClass1(java.lang.Number)") |
|
93 protected <V extends Number & Runnable> TestClass1(V v){} |
|
94 |
|
95 @ExpectedGenericString( |
|
96 "<E extends java.lang.Exception> TestClass1() throws E") |
91 @ExpectedString( |
97 @ExpectedString( |
92 "TestClass1() throws java.lang.Exception") |
98 "TestClass1() throws java.lang.Exception") |
93 <E extends Exception> TestClass1() throws E {} |
99 <E extends Exception> TestClass1() throws E {} |
94 |
100 |
95 @ExpectedGenericString( |
101 @ExpectedGenericString( |