Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8199424

consider removing ObjectInputStream and ObjectOutputStream native methods

XMLWordPrintable

      There are several native methods in ObjectInputStream and ObjectOutputStream:

          ObjectInputStream.bytesToFloats
          ObjectInputStream.bytesToDoubles
          ObjectOutputStream.floatsToBytes
          ObjectOutputStream.doublesToBytes

      Each of these method has a comment of the following form near the native method declaration in the corresponding .java file:

          // REMIND: remove once hotspot inlines Float.intBitsToFloat

      The methods

          Float.floatToIntBits
          Float.intBitsToFloat
          Double.doubleToLongBits
          Double.longBitsToDouble

      are all annotated with @HotSpotIntrinsicCandidate so this might indicate that the "inlining" being awaited in the comment has been fulfilled. If so, the serialization native methods can be removed.

            darcy Joe Darcy
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: