Don't let certain errors fail SPI loading #41991
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Modifies
Providers
to catch and logLinkageError
andServiceConfigurationError
to prevent these errors from failing service provider loading. This is being done as it is possible for implementations of our service provider interfaces to use designs that aren't generally compatible with our support matrix, an example of this is our own JDK HttpClient implementation of the HttpClient service provider which only supports Java 11+ but we base line our Java support on Java 8. It's possible for this to be on the classpath even if the JVM running an application using our SDKs only supports Java 8, and this would cause the application to error out even is another HttpClient implementation, such as our Netty implementation, is also available on the classpath and is valid.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines