> This reimplements 
> `sun.reflect.ReflectionFactory::newConstructorForSerialization` with method 
> handles.
> 
> This API currently generates the bytecode which fails the verification 
> because `new C; invokespecial A()` where the given class `C` and invoke a 
> no-arg constructor of `C`'s first non-`Serializable` superclass `A` is not a 
> valid operation per the VM specification. VM special cases the classes 
> generated for reflection to skip verification for the constructors generated 
> for serialization and externalization.  This change will allow such VM hack 
> to be removed.
> 
> A `jdk.reflect.useOldSerializableConstructor` system property can be set to 
> use the old implementation in case if customers run into any compatibility 
> issue.   I expect this change has very low compatibility risk.   This system 
> property is undocumented and will be removed in a future release.

Mandy Chung has updated the pull request incrementally with one additional 
commit since the last revision:

  review feedback

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/15600/files
  - new: https://git.openjdk.org/jdk/pull/15600/files/fb3bf590..c4e39d12

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15600&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15600&range=01-02

  Stats: 10 lines in 2 files changed: 0 ins; 5 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/15600.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15600/head:pull/15600

PR: https://git.openjdk.org/jdk/pull/15600

Reply via email to