-
CSR
-
Resolution: Approved
-
P4
-
None
-
binary
-
medium
-
-
Java API
-
JDK
Summary
Correct the method-level specification to align with the signature of the serialization method readObjectNoData,
private void readObjectNoData() throws ObjectStreamException;
Problem
The method that returns the matching handle for readObjectNoData
, sun.reflect.ReflectionFactory.readObjectNoDataForSerialization
, assumes the erroneous signature readObjectNoData(ObjectInputStream)
- note the superfluous parameter.
Solution
Update the specification of sun.reflect.ReflectionFactory.readObjectNoDataForSerialization
to use the correct parameter list.
Specification
jdk.unsupported/share/classes/sun/reflect/ReflectionFactory.java
/**
* Returns a direct MethodHandle for the {@code readObjectNoData} method on
* a Serializable class.
- * The first argument of {@link MethodHandle#invoke} is the serializable
- * object and the second argument is the {@code ObjectInputStream} passed to
- * {@code readObjectNoData}.
+ * The only argument of {@link MethodHandle#invoke} is the serializable
+ * object, which {@code readObjectNoData} is called on. No arguments are
+ * passed to the {@code readObjectNoData} method.
*
* @param cl a Serializable class
* @return a direct MethodHandle for the {@code readObjectNoData} method
public final MethodHandle readObjectForSerialization(Class<?> cl) {}
- csr of
-
JDK-8275137 jdk.unsupported/sun.reflect.ReflectionFactory.readObjectNoDataForSerialization uses wrong signature
-
- Closed
-