JDK 14 RFR of JDK-8199424: consider removing ObjectInputStream and ObjectOutputStream native methods
joe.darcy at oracle.com
Thu Sep 19 22:34:58 UTC 2019
As part of my serialization work, I noticed some "to do" notes in
ObjectOutputStream.java to get rid of two native methods once the
integral <-> floating-point bitwise conversion methods
(Float.floatToIntBits, etc.) were intrinsified. That intrinsification
occurred many releases back and the recommended cleanup can be done now.
Pre-existing bug for this issue:
JDK-8199424 : consider removing ObjectInputStream and
ObjectOutputStream native methods
Note the logic controlling for copying the float bytes is the same as
the logic for copying the int bytes as both int and float are 4 bytes,
same relationship between the copying of double and long bytes.
The serialization regression tests pass with this change. I have not
attempted to benchmark any speed differences with and without the
cleanup, but would welcome such an experiment being done.
More information about the core-libs-dev