8335252: Reduce size of j.u.Formatter.Conversion#isValid

Reviewed-by: redestad
This commit is contained in:
Shaojin Wen 2024-06-28 22:27:34 +00:00 committed by Chen Liang
parent 166f9d9ac0
commit 5d866bf17d

View File

@ -4967,9 +4967,9 @@ public final class Formatter implements Closeable, Flushable {
DECIMAL_FLOAT,
HEXADECIMAL_FLOAT,
HEXADECIMAL_FLOAT_UPPER,
LINE_SEPARATOR,
PERCENT_SIGN -> true;
default -> false;
LINE_SEPARATOR -> true;
// Don't put PERCENT_SIGN inside switch, as that will make the method size exceed 325 and cannot be inlined.
default -> c == PERCENT_SIGN;
};
}