RFR: 8279800: isAssignableFrom checks in AlgorithmParametersSpi.engineGetParameterSpec appear to be backwards [v2]
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Wed Jan 12 22:55:29 UTC 2022
On Wed, 12 Jan 2022 20:49:13 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
> > 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.
Oh, I missed that the paramSpec should be of class T, which extends AlgorithmParameterSpec. Then, I have no more concerns.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7037
More information about the security-dev
mailing list