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

serialization of RemoteException from merlin to prior release corrupts message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta
    • generic, x86, sparc
    • generic, solaris_2.6, solaris_7
    • Verified

      The changes to RemoteException introduced by 4209652 and revised by 4385429 have still left serialization from merlin to prior releases in an undesirable state. Specifically, because the current merlin code appends the cause.toString to the message prior to calling the superclass constructor, the actual string in the serialized form includes this appendage. When the exception is deserialized in a prior release, the getMessage() method in that prior release will again append the nested exception, causing duplication in the value of the message and the output of toString and printStackTrace. So, an exception in merlin that contains a message of the form
          foo; java.lang.Exception: bar
      deserializes in prior releases with a message of the form
          foo; java.lang.Exception: bar; nested exception is:
              java.lang.Exception: bar

      In addition, the javadoc for the RemoteException(String, Throwable) constructor was left to say that the instance is constructed with "the specified detail message", which is not what the current implementation actually does.

            mwarressunw Michael Warres (Inactive)
            bscheiflsunw Bob Scheifler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: