Skip to content

Commit 5d866bf

Browse files
wenshaoliach
authored andcommitted
8335252: Reduce size of j.u.Formatter.Conversion#isValid
Reviewed-by: redestad
1 parent 166f9d9 commit 5d866bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/java.base/share/classes/java/util/Formatter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4967,9 +4967,9 @@ static boolean isValid(char c) {
49674967
DECIMAL_FLOAT,
49684968
HEXADECIMAL_FLOAT,
49694969
HEXADECIMAL_FLOAT_UPPER,
4970-
LINE_SEPARATOR,
4971-
PERCENT_SIGN -> true;
4972-
default -> false;
4970+
LINE_SEPARATOR -> true;
4971+
// Don't put PERCENT_SIGN inside switch, as that will make the method size exceed 325 and cannot be inlined.
4972+
default -> c == PERCENT_SIGN;
49734973
};
49744974
}
49754975

0 commit comments

Comments
 (0)