13: Remove export of com.oracle.jipher.provider#7
Conversation
…aded by the ServiceLoader A `java.security` file allows: ``` security.provider.<n>=<provName | className> ``` Statically registered security providers loaded by the ServiceLoader must be registered using their provider name. Those registered using their class name are loaded the legacy pre-module way via reflection.
…module This change makes it no longer possible to call `new JipherJCE()` from a modular application. A modular application must use the `ServiceLoader` to obtain an instance of the `JipherJCE` provider (that has not already been registered with the JCA).
…racle.jipher.provider.JipherJCE Now that `com.oracle.jipher.provider` is no longer exported from the `com.oracle.jipher` module these static methods are no longer accessable to a modular application. The original intended purpose of these static methods was for an application to be able to determine if Jipher failed to load and configure OpenSSL (and why), such as in the case where the JipherJCE Provider is statically registered. It is possible to reliably determine if OpenSSL failed to load by just attempting to construct a new JipherJCE instance via the ServiceLoader. If OpenSSL failed to load the ServiceLoader throws a ServiceConfigurationError with a chain of caused-by Exceptions that includes an exception detailing why OpenSSL failed to load. Consequently, these static methods no longer serve any purpose.
|
👋 Welcome back jspillett! A progress list of the required criteria for merging this PR into |
|
@jon-oracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Exporting com.oracle.jipher.provider means that all public methods/fields of the public classes in that package are an API and supported interface.
Currently com.oracle.jipher.provider is exported for two reasons:
Neither (1) nor (2) are essential features of the library.
It would be good to limit the API to essential elements only.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/brisbane.git pull/7/head:pull/7$ git checkout pull/7Update a local copy of the PR:
$ git checkout pull/7$ git pull https://git.openjdk.org/brisbane.git pull/7/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7View PR using the GUI difftool:
$ git pr show -t 7Using diff file
Download this PR as a diff file:
https://git.openjdk.org/brisbane/pull/7.diff
Using Webrev
Link to Webrev Comment