-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b97
-
unknown
-
generic
-
Verified
The new diamond implementation generates spurious raw types diagnostics:
class Foo<X> {
Foo() {}
Foo<String> f = new Foo<>();
}
this produces the following output (when compiled with -Xlint):
TestX.java:3: warning: [rawtypes] found raw type: Foo
Foo<String> f = new Foo<>();
^
missing type parameters for generic class Foo<X>
where X is a type-variable:
X extends Object declared in class Foo
1 warning
class Foo<X> {
Foo() {}
Foo<String> f = new Foo<>();
}
this produces the following output (when compiled with -Xlint):
TestX.java:3: warning: [rawtypes] found raw type: Foo
Foo<String> f = new Foo<>();
^
missing type parameters for generic class Foo<X>
where X is a type-variable:
X extends Object declared in class Foo
1 warning
- relates to
-
JDK-6939620 Switch to 'complex' diamond inference scheme
-
- Closed
-