sun.reflect.ReflectionFactory provides MethodHandles for the various 
serialization methods, it is a critical internal API in the jdk.unsupported 
module (see JEP 260 [1]) that may be used by 3rd party serialization libraries. 

One of these serialization methods is readObjectNoData [2]:

```private void readObjectNoData() throws ObjectStreamException;```

The issue: The method that returns the matching handle, 
sun.reflect.ReflectionFactory.readObjectNoDataForSerialization, uses an 
erroneous signature `readObjectNoData(ObjectInputStream)` - note the 
superfluous parameter.

This change updates the specification and fixes the implementation in 
java.base/jdk.internal.reflect.ReflectionFactory.

Testing: tier 1-3

[1] https://openjdk.java.net/jeps/260
[2] 
https://docs.oracle.com/en/java/javase/15/docs/specs/serialization/input.html#the-readobjectnodata-method

-------------

Commit messages:
 - initial commit

Changes: https://git.openjdk.java.net/jdk/pull/5951/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5951&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275137
  Stats: 28 lines in 3 files changed: 4 ins; 6 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5951.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5951/head:pull/5951

PR: https://git.openjdk.java.net/jdk/pull/5951

Reply via email to