On Wed, 21 Jan 2026 20:07:20 GMT, Chen Liang <[email protected]> wrote:
>> test/jdk/java/lang/runtime/SwitchBootstrapsTest.java line 161: >> >>> 159: testEnum(E1.B, 1, 3, "B", "C", "A", E1.class); >>> 160: assertThrows(IllegalArgumentException.class, () -> >>> 161: testEnum(E1.B, 0, -1, E2.class) >> >> for readability it could be worth to add a helper method >> `testEnumError(Class<? extends RuntimeException> exceptionClass, Enum<?> >> target, int start, int result, Object... labels)` > > The `start` and `result` arguments here are completely unused. TBH, I am not sure if that's more readable. It might be shorter, but it is one more hoop to go through when trying to understand what the test is doing. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29350#discussion_r2720052217
