On Fri, 19 May 2023 17:11:40 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> I don't think there is any chance that the factory method returns a Collator >> that fails to meet the settings in the locale, because >> setStrength()/setDecompositon() with valid values never fail. So the >> returned instance will always have the requested strength/decomposition. >> Does this answer your question? > >> I don't think there is any chance that the factory method returns a Collator >> that fails to meet the settings in the locale, because >> setStrength()/setDecompositon() with valid values never fail. So the >> returned instance will always have the requested strength/decomposition. >> Does this answer your question? > > It's the last sentence that bothers me. I understand the setters can't fail > but the last sentence of the proposed text makes it sound like invalid > settings will be just ignored. So I think this sentence needs to be > re-examined as I don't think I understand what it is trying to say now. IIUC that's already the existing behavior for any Unicode extension. Example, Locale enIsoLoc = Locale.forLanguageTag("en-u-fw-mon"); WeekFields.of(enIsoLoc).getFirstDayOfWeek(); // MONDAY Locale badExtension = Locale.forLanguageTag("en-u-fw-zzz"); WeekFields.of(badExtension).getFirstDayOfWeek(); // SUNDAY If the value for a Unicode extension is invalid, they are simply ignored. In this case 'zzz' is not recognized and thus can not overhaul the first day of the week. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14040#discussion_r1199266617