RFR: 8175874: Update Security.insertProviderAt to specify behavior when requested position is out of range. [v3]

Valerie Peng valeriep at openjdk.org
Mon Aug 14 23:07:08 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

src/java.base/share/classes/java/security/Security.java line 300:

> 298:      * requested algorithms.  The position is 1-based, that is,
> 299:      * 1 is most preferred, followed by 2, and so on.  If the position
> 300:      * is less than 1 or greater than n, where n is the number of providers,

nit: where n is the number of _installed_ providers


PR Review Comment: https://git.openjdk.org/jdk/pull/14925#discussion_r1294045900

More information about the security-dev mailing list