RFR: 8345139: Fix bugs and inconsistencies in the Provider services map [v5]

Martin Balao mbalao at openjdk.org
Thu Apr 3 00:51:04 UTC 2025


On Thu, 6 Mar 2025 06:15:17 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 1508:
> 
>> 1506:                 // to a removal. In any case, let the caller proceed with the
>> 1507:                 // Properties map update.
>> 1508:                 parseLegacy(servicesMap, ks, oldValueS, OPType.REMOVE);
> 
> no return here and falls through to the line 1512? Is this really intended?

Yes, it's intended because we need the caller to handle the property change. While a service is removed in the internal (services) map (and the corresponding property in the outer map automatically removed), nothing is added to the outer map for the new property. We need the caller to handle that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22613#discussion_r2025827860


More information about the security-dev mailing list