Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8209454

[error-prone] TypeParameterUnusedInFormals in jdk.net

XMLWordPrintable

    • 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)

            chegar Chris Hegarty
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: