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

Support package renaming for classes with ObjectInputStream.resolve

XMLWordPrintable

    • 1.1.6
    • x86, sparc
    • solaris_2.5.1, windows_nt
    • Verified



        Name: rm29839 Date: 10/20/97


        ObjectInputStream.resolveClass() can be overridden to
        retrieve a named class from a non-system location, which is
        very useful. Unfortunately, the class that is retrieved must
        be named exactly the same (including package) as the requested
        class, since ObjectStreamClass.setClass() checks the names
        for a match.

        Because of this, I find that any attempt to rename
        or repackage a class automatically results in the loss
        of all streamed-out instances of that class ... I would
        like to write an input stream subclass that allowed class
        substitution, but this doesn't seem possible.

        The ability to substitute classes with different names
        during Object input would be greatly appreciated.
        (Or at least a conversion facility to modify object
        streams.)

        company - Effective Edge , email - ###@###.###
        ======================================================================

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: