RFR: 8175874: Update Security.insertProviderAt to specify behavior when requested position is out of range. [v3]
Sean Mullan
mullan at openjdk.org
Mon Aug 14 21:21:09 UTC 2023
On Fri, 11 Aug 2023 18:41:35 GMT, Ben Perez <duke at openjdk.org> wrote:
>> Fixing the bug as stated would cause compatibility issues. E.g. the `addProvider` function always adds new providers at position 0 and therefore would always throw an error. Instead of changing how the function handles indices, we instead have left an `@implNote`
>
> Ben Perez has updated the pull request incrementally with one additional commit since the last revision:
>
> Changed wording in spec
I looked around, and I don't think there is an existing test that actually tests this behavior. So, I think we should add one. I think you can probably extend the existing `test/jdk/java/security/Provider/ChangeProviders.java` regression test and add more tests that try to insert the provider at various positions outside of the normal range (ex: -1, 0, n +1, n + 10) , and then checks that the provider was inserted at the end of the list.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14925#issuecomment-1678078457
More information about the security-dev
mailing list