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

Interoperability problem with incorrect RepositoryIds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.2
    • other-libs
    • x86
    • windows_nt



      Name: md23716 Date: 09/07/2000

      Incorrect RepositoryIds are generated in rmic when the private modifier
      is not specified on serialVersionUID.

      ----------------------------------------------------
      Example of correct behaviour (private is specified):

          public class A3 implements java.io.Serializable {
            private static final long serialVersionUID = 3L;
            public int junk;
          }

      serialver A3 gives:
      A3: static final long serialVersionUID = 3L;

      rmic -idl A3 gives:
          valuetype A3 {
              public long junk;
              factory create( );
          };
      #pragma ID A3 "RMI:A3:6E3DC05D31FC340E:0000000000000003"

      ----------------------------------------------------------
      Example of incorrect behaviour (private is not specified):

          public class A2 implements java.io.Serializable {
            public static final long serialVersionUID = 2L;
            public int junk;
          }

      serialver A2 gives:
      A2: static final long serialVersionUID = 2L;

      rmic -idl A2 gives:
          valuetype A2 {
              const long long serialVersionUID = 2;
              public long junk;
              factory create( );
          };
      #pragma ID A2 "RMI:A2:6E3DC05D31FC340E:D2BD624D81B437AD"

      The serialization version UID string in the Repository Id in the #pragma
      is incorrect and will lead to interoperability failures.


      ======================================================================

            ajindalsunw Anita Jindal (Inactive)
            mdevereuorcl Michelle Devereux (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: