JDK-4972569 : REGRESSION:java.awt.Component.AccessibleAWTComponent changed its serialVersionUI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 2003-12-24
  • Updated: 2004-03-04
  • Resolved: 2004-01-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b35Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description

Name: ygR10224			Date: 12/24/2003



Filed By      : SPB JCK team (###@###.###)
JDK           : java full version "1.5.0-beta-b32"
JCK           : 1.5
Platform[s]   : Solaris
switch/Mode   : 
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : 
  api/java_awt/Component/AccessibleAWTComponent/serial/index.html#Constructor[serial2001]
  api/java_awt/Component/AccessibleAWTComponent/serial/index.html#Input[serial2002]
  api/java_applet/Applet/AccessibleApplet/serial/index.html#Constructor[serial2001]
  api/java_awt/Button/AccessibleAWTButton/serial/index.html#Constructor[serial2001]
  api/java_awt/Button/AccessibleAWTButton/serial/index.html#Input[serial2002]
  api/java_awt/Canvas/AccessibleAWTCanvas/serial/index.html#Constructor[serial2001]
  api/java_awt/Canvas/AccessibleAWTCanvas/serial/index.html#Input[serial2002]
  api/java_awt/Checkbox/AccessibleAWTCheckbox/serial/index.html#Constructor[serial2001]
  api/java_awt/Checkbox/AccessibleAWTCheckbox/serial/index.html#Input[serial2002]
  api/java_awt/Choice/AccessibleAWTChoice/serial/index.html#Constructor[serial2001]
  api/java_awt/Choice/AccessibleAWTChoice/serial/index.html#Input[serial2002]
  api/java_awt/CheckboxMenuItem/AccessibleAWTCheckboxMenuItem/serial/index.html#Constructor[serial2001]
  api/java_awt/CheckboxMenuItem/AccessibleAWTCheckboxMenuItem/serial/index.html#Input[serial2002]
  api/java_awt/Container/AccessibleAWTContainer/serial/index.html#Constructor[serial2001]
  api/java_awt/Dialog/AccessibleAWTDialog/serial/index.html#Constructor[serial2001]
  api/java_awt/Frame/AccessibleAWTFrame/serial/index.html#Constructor[serial2001]
  api/java_awt/Label/AccessibleAWTLabel/serial/index.html#Constructor[serial2001]
  api/java_awt/Label/AccessibleAWTLabel/serial/index.html#Input[serial2002]
  api/java_awt/List/AccessibleAWTList/AccessibleAWTListChild/serial/index.html#Constructor[serial2001]
  api/java_awt/List/AccessibleAWTList/AccessibleAWTListChild/serial/index.html#Input[serial2002]
  api/java_awt/List/AccessibleAWTList/serial/index.html#Constructor[serial2001]
  api/java_awt/List/AccessibleAWTList/serial/index.html#Input[serial2002]
  api/java_awt/Menu/AccessibleAWTMenu/serial/index.html#Constructor[serial2001]
  api/java_awt/Menu/AccessibleAWTMenu/serial/index.html#Input[serial2002]
  api/java_awt/MenuBar/AccessibleAWTMenuBar/serial/index.html#Constructor[serial2001]
  api/java_awt/MenuBar/AccessibleAWTMenuBar/serial/index.html#Input[serial2002]
  api/java_awt/MenuComponent/AccessibleAWTMenuComponent/serial/index.html#Constructor[serial2001]
  api/java_awt/MenuComponent/AccessibleAWTMenuComponent/serial/index.html#Input[serial2002]
  api/java_awt/MenuItem/AccessibleAWTMenuItem/serial/index.html#Constructor[serial2001]
  api/java_awt/MenuItem/AccessibleAWTMenuItem/serial/index.html#Input[serial2002]
  api/java_awt/Panel/AccessibleAWTPanel/serial/index.html#Constructor[serial2001]
  api/java_awt/PopupMenu/AccessibleAWTPopupMenu/serial/index.html#Constructor[serial2001]
  api/java_awt/PopupMenu/AccessibleAWTPopupMenu/serial/index.html#Input[serial2002]
  api/java_awt/ScrollPane/AccessibleAWTScrollPane/serial/index.html#Constructor[serial2001]
  api/java_awt/Scrollbar/AccessibleAWTScrollBar/serial/index.html#Constructor[serial2001]
  api/java_awt/Scrollbar/AccessibleAWTScrollBar/serial/index.html#Input[serial2002]
  api/java_awt/TextArea/AccessibleAWTTextArea/serial/index.html#Constructor[serial2001]
  api/java_awt/TextArea/AccessibleAWTTextArea/serial/index.html#Input[serial2002]
  api/java_awt/TextComponent/AccessibleAWTTextComponent/serial/index.html#Constructor[serial2001]
  api/java_awt/TextComponent/AccessibleAWTTextComponent/serial/index.html#Input[serial2002]
  api/java_awt/TextField/AccessibleAWTTextField/serial/index.html#Constructor[serial2001]
  api/java_awt/TextField/AccessibleAWTTextField/serial/index.html#Input[serial2002]
  api/java_awt/Window/AccessibleAWTWindow/serial/index.html#Constructor[serial2001]
  api/java_awt/serialization/descriptions.html#Component[testRead]
  api/java_awt/serialization/descriptions.html#Container[testRead]
  api/java_awt/serialization/descriptions.html#ScrollPane[testRead]



Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
...
...
>From JOSS, ch. 4.6 "Stream Unique Identifiers":
The stream-unique identifier is a 64-bit hash of the class name, interface
class names, methods, and fields. The value must be declared in all versions
of a class except the first. It may be declared in the original class but
is
not required. The value is fixed for all compatible classes.
...
...
...
---------- end-of-excerpt ---------------

Problem description
===================

The serialVersionUID of java.awt.Component.AccessibleAWTComponent has been 
changed in JDK1.5.0-beta-b32, so Serialized Form of this class has been 
changed incompatibly:

<gyi@helmet> /set/java/jdk1.4.2/solaris/bin/serialver java.awt.Component.AccessibleAWTComponent
java.awt.Component.AccessibleAWTComponent:    static final long serialVersionUID = 642321655757800191L;

<gyi@helmet> /set/jdk-builds/JDK1.5.0b31/solaris-sparc/bin/serialver java.awt.Component.AccessibleAWTComponent
java.awt.Component.AccessibleAWTComponent:    static final long serialVersionUID = 642321655757800191L;

<gyi@helmet> /set/jdk-builds/JDK1.5.0b32/solaris-sparc/bin/serialver java.awt.Component.AccessibleAWTComponent
java.awt.Component.AccessibleAWTComponent:    static final long serialVersionUID = -6055647477550951630L;




JCK test source location:
==========================
/java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

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

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b35 tiger-beta2 VERIFIED IN: tiger-b40
24-08-2004

SUGGESTED FIX Declare an explicit serialVersionUID for java.awt.Component.AccessibleAWTComponent equal to that present in JDK 1.4. Name: osR10079 Date: 01/06/2004 ------- Component.java ------- *** /tmp/sccs.ZFaaRB Tue Jan 6 11:34:57 2004 --- Component.java Tue Jan 6 11:19:57 2004 *************** *** 7856,7861 **** --- 7856,7863 ---- protected abstract class AccessibleAWTComponent extends AccessibleContext implements Serializable, AccessibleComponent { + private static final long serialVersionUID = 642321655757800191L; + /** * Though the class is abstract, this should be called by * all sub-classes. ###@###.### Jan 06, 2004 ======================================================================
24-08-2004

EVALUATION Name: osR10079 Date: 12/26/2003 We change nothing in Component.java from b31 to b32. And it is very strange that serialVersionUID has changed. Also, I've performed the follows test: I've run serialver from b31 with classpath pointed to rt.jar from b31 and b32 in both cases it rerurn the same uid (642321655757800191L), than the same with serialver from b32 and in both case it returns wrong uid (-6055647477550951630L) Thus based on both facts (we do not change Component.java and serialver produces suspicious results) I believe it is a problem in algorithm which calculates uid. And so I reassign it to serialization team for further investigation. ###@###.### Dec 25, 2003 ====================================================================== Running javap -private java.awt.Component.AccessibleAWTComponent with b31 and b32 reveals differences in the class between the two versions, attributable to changes in javac. First, the b31 version of the class defines the following (synthetic) accessor method: private final java.awt.Component this$0; while the b32 version instead defines: final java.awt.Component this+0; I believe this is due to the fix for 4884881 ("use non-identifier character in synthetic names"). Also, the b31 version of the class defines: static java.awt.Component access$000(java.awt.Component$AccessibleAWTComponent); which is not present in the b32 version of the class. Either of these differences is sufficient to cause a change in the default serialVersionUID for java.awt.Component.AccessibleAWTComponent. The solution is to declare an explicit serialVersionUID for AccessibleAWTComponent that matches the default value for 1.4 and earlier. ###@###.### 2004-01-05
05-01-2004