aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-12-21 11:39:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-12-21 11:39:34 +0000
commit9a33f4130bdccaa905ddc4885465d7ba30b3ee1a (patch)
treec55c3ad54ff76e561545974e1e0e828a4fcca7b3
parent1647dd701f16e1ec4092476406763683dec44960 (diff)
parentb09d5fb69d170c40d84161268673decf7461c73d (diff)
downloadjunit-9a33f4130bdccaa905ddc4885465d7ba30b3ee1a.tar.gz
Merge "Fix compile error on JDK 18 and later" into main
-rw-r--r--README.version1
-rw-r--r--src/main/java/org/junit/runner/Result.java2
2 files changed, 2 insertions, 1 deletions
diff --git a/README.version b/README.version
index 430e5e8..32adc06 100644
--- a/README.version
+++ b/README.version
@@ -7,3 +7,4 @@ Local Changes:
Remove DisableOnDebug (new in 4.12) as it is not supported on Android
Remove support for stuck threads
Don't convert assumption failures into errors in rules/ErrorCollector
+ Fix compile error on JDK 18 and later (copied from https://github.com/junit-team/junit4/commit/0eb5ce72848d730da5bd6d42902fdd6a8a42055d)
diff --git a/src/main/java/org/junit/runner/Result.java b/src/main/java/org/junit/runner/Result.java
index 4b5f4a4..ff53b08 100644
--- a/src/main/java/org/junit/runner/Result.java
+++ b/src/main/java/org/junit/runner/Result.java
@@ -188,7 +188,7 @@ public class Result implements Serializable {
}
@SuppressWarnings("unchecked")
- private SerializedForm(ObjectInputStream.GetField fields) throws IOException {
+ private SerializedForm(ObjectInputStream.GetField fields) throws IOException, ClassNotFoundException {
fCount = (AtomicInteger) fields.get("fCount", null);
fIgnoreCount = (AtomicInteger) fields.get("fIgnoreCount", null);
assumptionFailureCount = (AtomicInteger) fields.get("assumptionFailureCount", null);