RFR: 8279800: isAssignableFrom checks in AlgorithmParametersSpi.engineGetParameterSpec appear to be backwards

Valerie Peng valeriep at openjdk.java.net
Wed Jan 12 19:59:29 UTC 2022


On Wed, 12 Jan 2022 19:45:49 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> test/jdk/java/security/spec/IsAssignableFromOrder.java line 72:
>> 
>>> 70:     static void test(String algorithm, AlgorithmParameterSpec spec,
>>> 71:             Class<? extends AlgorithmParameterSpec>... classes) throws Exception {
>>> 72:         var ap1 = AlgorithmParameters.getInstance(algorithm);
>> 
>> nit: Print out the algorithm which has been tested?
>
> I can, but if an exception is thrown, I can find out which algorithm has a problem by looking at the line number.

Yes, just thought that reporting the algorithm to the test output seems more informative. Otherwise, always have to dig out the source to find out what has been covered.

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

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



More information about the security-dev mailing list