author | jjg |
Thu, 01 Nov 2018 14:32:55 -0700 | |
changeset 52377 | 907fdbbdf584 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
43761
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
1 |
/* |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
4 |
* |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
52377 | 7 |
* published by the Free Software Foundation. |
43761
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
8 |
* |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
13 |
* accompanied this code). |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
14 |
* |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
18 |
* |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
21 |
* questions. |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
22 |
*/ |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
23 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
24 |
/* |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
25 |
* @test |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
26 |
* @bug 8174249 |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
27 |
* @summary Regression in generic method unchecked calls |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
28 |
* @compile T8174249b.java |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
29 |
*/ |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
30 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
31 |
import java.util.*; |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
32 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
33 |
class T8174249b { |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
34 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
35 |
static void cs(Collection<String> cs) {} |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
36 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
37 |
void test1(Collection c) { |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
38 |
cs(rawCollection((Class)null)); |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
39 |
Collection<String> cs1 = rawCollection((Class)null); |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
40 |
} |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
41 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
42 |
void test2(Collection c) { |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
43 |
cs(rawCollection2((Class)null)); |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
44 |
Collection<String> cs2 = rawCollection2((Class)null); |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
45 |
} |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
46 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
47 |
void test3(Collection c) { |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
48 |
cs(rawCollection3((Class)null)); |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
49 |
Collection<String> cs3 = rawCollection2((Class)null); |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
50 |
} |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
51 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
52 |
Collection<Integer> rawCollection(Class<String> cs) { return null; } |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
53 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
54 |
<Z> Collection<Integer> rawCollection2(Class<Z> cs) { return null; } |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
55 |
|
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
56 |
<Z> Collection<Z> rawCollection3(Class<Z> cs) { return null; } |
f50592785b30
8174249: Regression in generic method unchecked calls
mcimadamore
parents:
diff
changeset
|
57 |
} |