-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.2
-
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.
======================================================================
- duplicates
-
JDK-4350294 Incorrect CORBA RepositoryID calculations
-
- Resolved
-