author | mcimadamore |
Fri, 12 Dec 2014 18:07:24 +0000 | |
changeset 28142 | 32a6b1af81b1 |
child 32337 | c9d3ab9f601c |
permissions | -rw-r--r-- |
28142
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
1 |
/* |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
4 |
* |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
10 |
* |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
15 |
* accompanied this code). |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
16 |
* |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
20 |
* |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
23 |
* questions. |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
24 |
*/ |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
25 |
|
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
26 |
// key: compiler.warn.method.redundant.typeargs |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
27 |
// options: -XDfind=method |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
28 |
|
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
29 |
class MethodRedundantTypeargs { |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
30 |
<Z> Z id(Z z) { return z; } |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
31 |
|
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
32 |
void test() { |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
33 |
String s = this.<String>id(""); |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
34 |
} |
32a6b1af81b1
8064365: Better support for finder capabilities in target-typing context
mcimadamore
parents:
diff
changeset
|
35 |
} |