On Tue, 25 May 2021 16:47:15 GMT, Brian Goetz <briango...@openjdk.org> wrote:
>> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More vertical alignment > > src/java.base/share/classes/java/util/Calendar.java line 1507: > >> 1505: } >> 1506: case "japanese" -> cal = new >> JapaneseImperialCalendar(zone, locale, true); >> 1507: default -> throw new IllegalArgumentException("unknown >> calendar type: " + type); > > Agree with Chris' suggestion here. Done! > src/java.base/share/classes/java/util/JapaneseImperialCalendar.java line 1124: > >> 1122: return Math.max(LEAST_MAX_VALUES[YEAR], d.getYear()); >> 1123: } >> 1124: } > > A switch with one element here is kind of weird. I would turn this into > "return switch (field) { ... }", with two cases, YEAR and default. Done, also at line 1169 ------------- PR: https://git.openjdk.java.net/jdk/pull/4161