On Fri, 1 May 2026 21:20:12 GMT, Justin Lu <[email protected]> wrote: >> OK, now I got what you are saying. However, it is not possible that the CLDR >> adapter is not a ResourceBundleBasedAdapter, as `CLDRLocaleProviderAdapter` >> extends `JRELocaleProviderAdapter` which implements >> `ResourceBundleBasedAdapter`. > > Exactly, I understand right now it isn't possible based on the current class > definitions. It's just that the new code opens the possibility for it to > accept such cases if that were to ever happen in the future (which again is > unlikely) when the previous code did not. At face value, the code implies it > is OK to have a non `RBBA` adapter there, when that isn't the case, so even a > comment saying that isn't the case provides clarity.
OK, added a clarifying comment. Actually there were cases where the subject code was not run, i.e. `java.locale.providers=JRE`. In such a case, an empty map was created, which is virtually the same as the `else` block for this `if` statement. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31006#discussion_r3175459459
