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

SerializedLambda does not preserve markers & bridges

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u101, 9
    • Fix Version/s: tbd_major
    • Component/s: core-libs
    • Labels:
      None

      Description

      SerializedLambda has fields storing most of the arguments to LambdaMetafactory (sometimes after mapping to a serialization-friendly form). But it does not have fields to store extra interfaces or extra method descriptors, as supported by 'altMetafactory'. As a result, serialization must be a lossy transformation, mapping many function objects to the same serialized form.

      Thus, while LambdaMetafactory promises to support serialization of any legal invocation that uses FLAG_SERIALIZABLE, in practice only the first invocation of a unique serialization key (key=the first 6 arguments) will serialize/deserialize correctly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlsmith Dan Smith
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: