On Fri, 11 Aug 2023 18:41:35 GMT, Ben Perez <d...@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

Reply via email to