[ELY-2026] Use reflection to pass through the new methods if they are now available on the SSLEngine, SSLParameters, and SSLSocket APIs. #1448
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.
https://issues.redhat.com/browse/ELY-2026
Under ELY-1979 we did attempt a number of different approaches to implement these methods directly and avoid the use of reflection, unfortunately as the project is built using Java 11 but targeting Java 8 the Java 11 compiler does not agree that these methods are present in Java 8.
We could consider a more complex build that compiles using two different JDKs but that seems overly complex, another option could be to split out an "accessor" class into another project which is built using the latest Java 8 (and has no plans to move to Java 11 soon) but that seems over complex.
Users of Java 9 or later will automatically get the JDKSpecific implementation that uses direct access.