--- old/src/java.base/share/classes/java/lang/ExceptionInInitializerError.java 2019-08-27 17:27:12.302324386 -0700 +++ new/src/java.base/share/classes/java/lang/ExceptionInInitializerError.java 2019-08-27 17:27:11.986324386 -0700 @@ -50,6 +50,7 @@ /** * Use serialVersionUID from JDK 1.1.X for interoperability */ + @java.io.Serial private static final long serialVersionUID = 1521711792217232256L; /** @@ -109,6 +110,7 @@ * * @serialField exception Throwable */ + @java.io.Serial private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("exception", Throwable.class) }; @@ -122,6 +124,7 @@ * field in the older implementation and ExceptionInInitializerError::cause * was set to null. */ + @java.io.Serial private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { ObjectInputStream.GetField fields = s.readFields(); Throwable exception = (Throwable) fields.get("exception", null); @@ -134,6 +137,7 @@ * To maintain compatibility with older implementation, write a serial * "exception" field with the cause as the value. */ + @java.io.Serial private void writeObject(ObjectOutputStream out) throws IOException { ObjectOutputStream.PutField fields = out.putFields(); fields.put("exception", super.getCause());