Please review this trivial fix that ensures that the mechanism always matches the parameter class type.
I added a new test case that crashes without the fix, passes with the fix. Existing tier1-3 test cases continue to pass. ------------- Commit messages: - Fix P11TlsKeyMaterialGenerator crash Changes: https://git.openjdk.org/jdk/pull/23583/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23583&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8349849 Stats: 90 lines in 2 files changed: 89 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/23583.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23583/head:pull/23583 PR: https://git.openjdk.org/jdk/pull/23583