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

Make javafx.util.Callback a sub-interface of java.util.function.Function

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      ADDITIONAL SYSTEM INFORMATION :
      C:\Users\hwaite>ver

      Microsoft Windows [Version 10.0.17763.914]

      C:\Users\hwaite>C:\jdk-13.0.1\bin\java -version
      openjdk version "13.0.1" 2019-10-15
      OpenJDK Runtime Environment (build 13.0.1+9)
      OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      Callback is a redundant interface; Ideally we'd remove. Since that might break too much existing code, next best thing is to make it a sub-interface of Function. At least this allows users to leverage Callbacks more broadly. It will also allow for more graceful deprecation in the future. This seems to be the approach taken by Guava team with com.google.common.base.Function (see Guava v20 vs Guava v21).


        Attachments

          Activity

            People

            Assignee:
            kcr Kevin Rushforth
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: