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

Martin Balao mbalao at openjdk.org
Wed Apr 2 21:14:50 UTC 2025


On Tue, 4 Mar 2025 01:55:06 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 988:
> 
>> 986:                         // The service was added with the Current API. Overwrite
>> 987:                         // the alias entry on the services map without modifying
>> 988:                         // the service that is currently using it.
> 
> Is the "service" in the above line really means the provider `service` entry? If so, may be "associated with" is better than "using". Also there is no code under this comment block, where is the action of "overwrite the alias entry on the services map"?

Yes, "associated with" is better. The overwrite happens later in `putService`. I'll clarify that in the comment.

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

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


More information about the security-dev mailing list