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

ServiceLoader class description improvements

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b03

      Description

      Improvements to the ServiceLoader class description from Alex Buckley:

      * Intro

      ... Application code refers only to the service, not to service providers. Application code is assumed to be capable of CHOOSING between multiple service providers (BASED ON THE FUNCTIONALITY THEY EXPOSE THROUGH THE SERVICE), AND handling the possibility that no service providers are located.

      * Obtaining a service loader

      First sentence: ServiceLoader font is wrong.

      Final sentences: "... will execute reliably. In addition, if the application module does not contain the service, then its module declaration must have a `requires` directive that specifies the module which exports the service. It is strongly recommended that the application module does [BOLD]not[/BOLD] require modules which contain providers of the service."

        Attachments

          Activity

            People

            Assignee:
            alanb Alan Bateman
            Reporter:
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: