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

Rename <baseName>Provider to <packagename>.spi.<simpleName>Provider

    XMLWordPrintable

Details

    • b173
    • Verified

    Backports

      Description

        JDK 9 defines a mechanism for providing localized resource bundles in more than one single module. For example a library can separate resource bundles for Asian and European languages in two separate modules (say M1 and M2) using service providers. The current naming convention of a ResourceBundleProvider is <bundleName>Provider. Such service type will be in the same package as the resource bundles. Let's say such service type is "p.resources.FooProvider" in module M. "p.resources" will need to be exported to M1 and M2 to implement the providers. The resource bundles are typically in .properties format and its names are p/resources/foo_ja.properties for example. In this case, the resource bundles in M1 and M2 must be renamed to a different package name due to the split package.

        This proposes to change the naming convention of the resource bundle service type to a different package "p.resources.spi.FooProvider" such that this will ease the migration especially when M, M1, M2 are defined to different loader in a custom layer where M, M1, M2 can continue to package the resource bundles under p/resources.

        Attachments

          Issue Links

            Activity

              People

                naoto Naoto Sato
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: