-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 12
-
Component/s: core-libs
-
b14
-
Not verified
src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java:257: warning: [TypeParameterUnusedInFormals] Declaring a type parameter that is only used in the return type is a misuse of generics: operations on the type parameter are unchecked, it hides unsafe casts at invocations of the method, and it interacts badly with method overload resolution.
private static <T> T checkValueType(Object value, Class<?> type) {
^
(see https://errorprone.info/bugpattern/TypeParameterUnusedInFormals.md)
private static <T> T checkValueType(Object value, Class<?> type) {
^
(see https://errorprone.info/bugpattern/TypeParameterUnusedInFormals.md)
- relates to
-
JDK-8209331 experimenting w/ error-prone
-
- Open
-
-
JDK-8189684 Lint warning when a method returns a naked type variable not present in the parameters
-
- Open
-
- links to