On Tue, 11 Jan 2022 20:38:30 GMT, Weijun Wang <[email protected]> wrote:
> Change the order so parent class is at the left.
Hm, an interesting catch. I have a concern, although.
src/java.base/share/classes/com/sun/crypto/provider/BlockCipherParamsCore.java
line 111:
> 109: <T extends AlgorithmParameterSpec> T getParameterSpec(Class<T>
> paramSpec)
> 110: throws InvalidParameterSpecException {
> 111: if (paramSpec.isAssignableFrom(IvParameterSpec.class)) {
The call to cast() is confusing. But if the paramSpec is
AlgorithmParameterSpec.class or Object.class, what's the expected behavior?
There are potential casting exception, I guess. Maybe, a exactly class
matching could be better.
-------------
Changes requested by xuelei (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7037