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

Lint warning when a method returns a naked type variable not present in the parameters

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 10
    • Fix Version/s: tbd_minor
    • Component/s: tools
    • Labels:
      None

      Description

      Javac should emit a lint warning when a method declares a naked type variable as return type that isn't present in the formal parameters.

      Alternatively, a specific callsite might be warned if a method declaring a naked type variable as return type is invoked with 'null' as actual argument for all parameters referring to this type variable.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bsrbnd Bernard Blaser
              Reporter:
              bsrbnd Bernard Blaser
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: