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

Serialization problem(StreamCorrupedException) in java.math.RoundingMode between 1.4.2 and 6

XMLWordPrintable

      When a CU tries to read an object serialized in jdk6 in jdk1.4.2,
      StreamCorruptedException occurs.

      CONFIGURATION :
      JDK : JDK6u23
      OS : Windows Vista business(SP2, Japanese)

      REPRODUCE :
      1) Compile the attaxhed x.java in jdk6u23
         and the attached y.java in jdk1.4.2 respectively.
      2) Invoke the following command line. Then StreamCorruptedException appears.

      C:\Users\licensees\serialization-142-6>java -showversion x out6in142
      java version "1.6.0_23"
      Java(TM) SE Runtime Environment (build 1.6.0_23-b04)
      Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode)


      C:\Users\licensees\serialization-142-6>java -showversion y out6in142
      java version "1.4.2_22"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_22-b02)
      Java HotSpot(TM) Client VM (build 1.4.2_22-b02, mixed mode)

      Exception in thread "main" java.io.StreamCorruptedException
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1301)
              at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1838)
              at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452)
              at java.text.DecimalFormat.readObject(DecimalFormat.java:2507)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:331)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1740)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
              at y.main(y.java:7)

            alanb Alan Bateman
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: