src/main/java/org/junit/runner/Result.java:192: error: unreported exception ClassNotFoundException; must be caught or declared to be thrown
fCount = (AtomicInteger) fields.get("fCount", null);
^
src/main/java/org/junit/runner/Result.java:193: error: unreported exception ClassNotFoundException; must be caught or declared to be thrown
fIgnoreCount = (AtomicInteger) fields.get("fIgnoreCount", null);
^
src/main/java/org/junit/runner/Result.java:194: error: unreported exception ClassNotFoundException; must be caught or declared to be thrown
assumptionFailureCount = (AtomicInteger) fields.get("assumptionFailureCount", null);
^
src/main/java/org/junit/runner/Result.java:195: error: unreported exception ClassNotFoundException; must be caught or declared to be thrown
fFailures = (List<Failure>) fields.get("fFailures", null);
^
This code fails to compile on JDK 18 and newer:
https://github.com/junit-team/junit4/blob/cc7c500584fcb85eaf98c568b7441ceac6dd335c/src/main/java/org/junit/runner/Result.java#L190-L198
This is the corresponding JDK change: https://bugs.openjdk.java.net/browse/JDK-8276742