-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b161
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8176956 | 10 | Maurizio Cimadamore | P3 | Resolved | Fixed | b03 |
Initially seen here:
http://stackoverflow.com/questions/42346895/constructor-reference-no-warning-when-generics-array-is-created
Javac does not generate unchecked warnings when checking method reference return types. The issue is not limited to arrays.
import java.util.function.*;
import java.util.*;
class Test {
void m() {
IntFunction<List<String>[]> sls = List[]::new; //no warning
Supplier<List<String>> sls = this::l; //no warning
}
List l() { return null; }
}
http://stackoverflow.com/questions/42346895/constructor-reference-no-warning-when-generics-array-is-created
Javac does not generate unchecked warnings when checking method reference return types. The issue is not limited to arrays.
import java.util.function.*;
import java.util.*;
class Test {
void m() {
IntFunction<List<String>[]> sls = List[]::new; //no warning
Supplier<List<String>> sls = this::l; //no warning
}
List l() { return null; }
}
- backported by
-
JDK-8176956 javac does not issue unchecked warnings when checking method reference return types
-
- Resolved
-