On Thu, 14 Oct 2021 14:44:34 GMT, Julia Boes <jb...@openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: 4961373a
Author:    Julia Boes <jb...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/4961373a676126cd557f92a2e7bbc8c66b2976b1
Stats:     28 lines in 3 files changed: 4 ins; 6 del; 18 mod

8275137: 
jdk.unsupported/sun.reflect.ReflectionFactory.readObjectNoDataForSerialization 
uses wrong signature

Reviewed-by: dfuchs

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

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

Reply via email to