Final fields on records are not modifiable via reflection. StreamRefTest.java needs to be updated to remove its dependency on Field::set. The two test cases in StreamRefTest.java are disabled by JDK-8247444.
diff --git a/test/jdk/java/io/Serializable/records/StreamRefTest.java b/test/jdk/java/io/Serializable/records/StreamRefTest.java
--- a/test/jdk/java/io/Serializable/records/StreamRefTest.java
+++ b/test/jdk/java/io/Serializable/records/StreamRefTest.java
@@ -112,7 +112,7 @@
static final Class<InvalidObjectException> IOE = InvalidObjectException.class;
- @Test
+ @Test(enabled=false)
public void basicRefWithInvalidA() throws Exception {
out.println("\n---");
var a = new A(3);
@@ -134,7 +134,7 @@
assertEquals(b1.a, null);
}
- @Test
+ @Test(enabled=false)
public void reverseBasicRefWithInvalidA() throws Exception {
out.println("\n---");
var a = new A(3);