On Wed, 12 Jan 2022 20:49:13 GMT, Xue-Lei Andrew Fan <xue...@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