RFR: 8345139: Fix bugs and inconsistencies in the Provider services map [v5]
Martin Balao
mbalao at openjdk.org
Thu Apr 3 00:56:52 UTC 2025
On Thu, 6 Mar 2025 07:06:08 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> Francisco Ferrari Bihurriet has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Clear ServicesMap fields in the declared order
>>
>> Constructors assign the fields in the same order.
>
> src/java.base/share/classes/java/security/Provider.java line 1536:
>
>> 1534:
>> 1535: private Object implRemove(Object key) {
>> 1536: Object oldValue = super.get(key);
>
> `oldValue` isn't really old value, is it? Naming it `oldValue` and pass it to `doLegacyOp()` as `value` is very confusing.
Yes, I see why it could be confusing. We named it `old` thinking from the returned value's point of view (when there is a removal, we have to return the old/previous value). Perhaps we should rename it to just `value`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22613#discussion_r2025831036
More information about the security-dev
mailing list