On Tue, 23 Jul 2024 20:54:08 GMT, Justin Lu <j...@openjdk.org> wrote:
>> As discussed in >> https://github.com/openjdk/jdk/pull/19513#discussion_r1684957942, there is >> code within java.text.NumberFormat (and subclasses) that can use the pattern >> match switch to improve readability. >> >> As this is simply cleanup, there is no regression test added. (Tiers 1-3 and >> java_text JCK ran to ensure clean migration). > > Justin Lu has updated the pull request incrementally with one additional > commit since the last revision: > > reflect review src/java.base/share/classes/java/text/NumberFormat.java line 331: > 329: case BigInteger bi when bi.bitLength() < 64 -> > format(bi.longValue(), toAppendTo, pos); > 330: case Number n -> format(n.doubleValue(), toAppendTo, pos); > 331: case null, default -> throw new > IllegalArgumentException("Cannot format given Object as a Number"); Suggestion: case null, default -> throw new IllegalArgumentException("Cannot format given Object as a Number"); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20302#discussion_r1690303087