On Wed, 12 Jan 2022 20:01:10 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Right, I suppose so.
>
> PBEKeyFactory.java, PBKDF2Core.java and PBKDF2HmacSHA1Factory.java also have 
> isAssignableFrom() calls which seem backward. Perhaps covering them as well?

> If so, then the `if` block will be true and the spec object is casted to your 
> specified class (`AlgorithmParameterSpec.class` or `Object.class`) and it 
> always succeeds.
> 
> This is exactly what I want to achieve.

Unfortunately, there is a returned value that we cannot return an object of any 
class.

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

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

Reply via email to