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

Provide a general way to make deep copies of objects

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs
    • generic
    • generic



      Name: rm29839 Date: 01/26/98


      MT applications often need to make deep copies of
      objects to be passed between threads. While Java
      provides a way to make shallow copies using the
      default implementation of Object.clone(), making
      deep copies generally is very cumbersome and
      sometimes even impossible. Currently the most
      general way to achieve this is to serialize the
      object and deserialize it again. This is
      cumbersome, slow, and, worst of all, requires all
      objects to be Serializable. The latter is
      especially bad if you don't have the source code
      to all classes you're using.

      Replication of arbitrary data structures could be
      implemented in a way simular to object
      serialization, i.e. one could traverse the graph
      the same way the ObjectOutputStream does, except
      that each reached object would have to be cloned
      instead of being written to some stream.
      (Review ID: 23953)
      ======================================================================

            Unassigned Unassigned
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: