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

[error-prone] TypeParameterUnusedInFormals in jdk.net

    Details

    • Subcomponent:
    • Resolved In Build:
      b14

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                iignatyev Igor Ignatyev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: