On Tue, 25 Feb 2025 19:40:24 GMT, Valerie Peng <valer...@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 2158: > >> 2156: hasKeyAttributes = null; >> 2157: supportedFormats = null; >> 2158: supportedClasses = null; > > Are these necessary? The other constructor didn't set them. We made these fields initialization explicit in the copy-constructor to document that cached fields need to be regenerated, and it's not that we forgot (or were added later). That's why we added the comment in the lines before. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22613#discussion_r2025222786