Skip to content

Commit 94e096c

Browse files
author
Paul Hohensee
committed
8335252: Reduce size of j.u.Formatter.Conversion#isValid
Backport-of: 5d866bf17d96bd0f0e4545d7eee5912eda2e3a94
1 parent cf8601c commit 94e096c

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
@@ -4765,9 +4765,9 @@ static boolean isValid(char c) {
47654765
DECIMAL_FLOAT,
47664766
HEXADECIMAL_FLOAT,
47674767
HEXADECIMAL_FLOAT_UPPER,
4768-
LINE_SEPARATOR,
4769-
PERCENT_SIGN -> true;
4770-
default -> false;
4768+
LINE_SEPARATOR -> true;
4769+
// Don't put PERCENT_SIGN inside switch, as that will make the method size exceed 325 and cannot be inlined.
4770+
default -> c == PERCENT_SIGN;
47714771
};
47724772
}
47734773

0 commit comments

Comments
 (0)