ReflectionFactory is not sufficient to support custom serialization libraries
David Lloyd
david.lloyd at redhat.com
Tue Dec 19 18:45:42 UTC 2017
The ReflectionFactory class which was introduced for the purposes of
supporting custom serialization libraries is not sufficient to the
task by itself, despite what was implied by [1].
While it allows invocation of the various non-public
serialization-related methods that are exposed by classes, it does not
allow for the actual reading and writing of serializable fields,
particularly those belonging to classes in the JDK itself; doing so
requires lots of --add-opens, as far as I can see, which largely
defeats the purpose of almost all of the methods that _were_ added to
ReflectionFactory for serialization support (because --add-opens
allows direct reflection anyway).
Is it possible to get some helper API added to ReflectionFactory to
cover this? Or is there a second API that I have somehow completely
missed?
[1] http://mail.openjdk.java.net/pipermail/jigsaw-dev//2017-May/012660.html
--
- DML
More information about the jigsaw-dev
mailing list