--- old/src/java.base/share/classes/java/lang/invoke/MethodType.java 2019-08-27 17:27:45.734324386 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/MethodType.java 2019-08-27 17:27:45.550324386 -0700 @@ -104,6 +104,7 @@ implements Constable, TypeDescriptor.OfMethod, MethodType>, java.io.Serializable { + @java.io.Serial private static final long serialVersionUID = 292L; // {rtype, {ptype...}} // The rtype and ptypes fields define the structural identity of the method type: @@ -1229,6 +1230,7 @@ /** * There are no serializable fields for {@code MethodType}. */ + @java.io.Serial private static final java.io.ObjectStreamField[] serialPersistentFields = { }; /** @@ -1251,6 +1253,7 @@ * @param s the stream to write the object to * @throws java.io.IOException if there is a problem writing the object */ + @java.io.Serial private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); // requires serialPersistentFields to be an empty array s.writeObject(returnType()); @@ -1270,6 +1273,7 @@ * @see #readResolve * @see #writeObject */ + @java.io.Serial private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { // Assign temporary defaults in case this object escapes MethodType_init(void.class, NO_PTYPES); @@ -1309,6 +1313,7 @@ * after serialization. * @return the fully initialized {@code MethodType} object */ + @java.io.Serial private Object readResolve() { // Do not use a trusted path for deserialization: // return makeImpl(rtype, ptypes, true);