On Tue, 23 Feb 2021 01:47:48 GMT, Ziyi Luo <[email protected]> wrote:

> All of the "isAssignableFrom" checks in "engineGetKeySpec" appear to be 
> backwards in Java's KeyFactorySpi.engineGetKeySpec implementations. In most 
> cases, the requested KeySpec is equal to the concrete implementation so the 
> inversion does not matter. But there are few cases, as presented in the added 
> jtreg test, will cause unexpected behavior (e.g., ClassCastException rather 
> than an InvalidKeySpecException). The fix is trivial.
> 
> Co-author @SalusaSecondus

This pull request has now been integrated.

Changeset: a777e82c
Author:    Ziyi Luo <[email protected]>
Committer: Jamil Nimeh <[email protected]>
URL:       https://git.openjdk.java.net/jdk/commit/a777e82c
Stats:     136 lines in 17 files changed: 73 ins; 0 del; 63 mod

8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be 
backwards

Reviewed-by: jnimeh

-------------

PR: https://git.openjdk.java.net/jdk/pull/2682

Reply via email to