JDK-4228568 : Cricket Build "N" fails Signature Test...missing serialVersionUID fields in util
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 1.2.0,1.2.2,1.3.0
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5,solaris_2.5.1,solaris_7
  • CPU: generic,sparc
  • Submitted: 1999-04-10
  • Updated: 2001-12-14
  • Resolved: 1999-04-23
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
1.2.2 1.2.2Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
SignatureTest report

Tested version: 1.2.2


Missing Fields
--------------

java.util.HashMap:  field public static final long serialVersionUID
java.util.LinkedList:                   field public static final long serialVersionUID
java.util.TreeMap:  field public static final long serialVersionUID


jeff.hsiao@eng 1999-04-28

JDK version: Kestrel build "b"
JCK version: 1.2a 

#Test Results
#Wed Apr 21 12:36:10 PDT 1999
description=file:/net/tapas/export1/testexec/JCK-12a/tests/api/SignatureTest/SignatureTest.html#SignatureTest
testsuite=/net/tapas/export1/testexec/JCK-12a/tests
executeArgs=-TestURL $testURL -FileName jdk1_2.sig
execStatus=Failed. 3 errors
end=Wed Apr 21 12:36:09 PDT 1999
work=/export0/results/13b/b3citation12ajdk/api/SignatureTest
executeClass=javasoft.sqe.tests.api.SignatureTest.SignatureTest
status=Failed. 3 errors
keywords=runtime positive
start=Wed Apr 21 12:26:56 PDT 1999
title=API Signature verification
javatestVersion=JT_2.0_zm
id=SignatureTest
file=/net/tapas/export1/testexec/JCK-12a/tests/api/SignatureTest/SignatureTest.html
timeout=1800
sections=testExecute testExecute
environment=jck-runtime-solaris
source=APIChangesTest.java APISortedErrorFormatter.java AttrData.java ClassCollection.java ClassConstants.java ClassData.java ClassFinder.java ClassSignatureReader.java ClassSorter.java ClassesFromClasspath.java DefinitionFormat.java ErrorFormatter.java ErrorMessage.java FieldData.java MemberDefinition.java MemberEntry.java MethodData.java PrimitiveConstantsChecker.java PublicTableOfClass.java SignatureClass.java SignatureConstants.java SignatureTest.java SortedErrorFormatter.java StaticClassFinder.java StaticSigTest.java TableOfClass.java

test: api/SignatureTest/SignatureTest.html#SignatureTest
script: javasoft.sqe.javatest.lib.JCKScript -runtime
Executing test class...
command: javasoft.sqe.javatest.lib.ExecJCKTestOtherJVMCmd CLASSPATH=/export0/results/13b/b3citation12ajdk/classes:/net/tapas/export1/testexec/JCK-12a/tests/../classes:/net/tapas/export1/testexec/JCK-12a/javatest.jar:/net/citation/export0/jdk13b/solaris/lib/tools.jar:/net/citation/export0/jdk13b/solaris/jre/lib/rt.jar:/net/citation/export0/jdk13b/solaris/jre/lib/i18n.jar DISPLAY=citation:0.0 HOME=/home/jhsiao LD_LIBRARY_PATH=/net/tapas/export1/testexec/JCK-12a/tests/../lib:/net/tapas/export1/testexec/JCK-12a/tests/../lib_solaris: /net/citation/export0/jdk13b/solaris/bin/java -Xfuture javasoft.sqe.tests.api.SignatureTest.SignatureTest -TestURL file:/net/tapas/export1/testexec/JCK-12a/tests/api/SignatureTest/SignatureTest.html#SignatureTest -FileName jdk1_2.sig
----------ref:testExecute(0/0)----------
----------log:testExecute(8/279)----------
Missing Fields
--------------

java.util.HashMap:  field public static final long serialVersionUID
java.util.LinkedList:                   field public static final long serialVersionUID
java.util.TreeMap:  field public static final long serialVersionUID

STATUS:Failed.3 errors
command result: Failed. 3 errors
test result: Failed. 3 errors

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.2.2 INTEGRATED IN: 1.2.2 VERIFIED IN: merlin-rc1
14-06-2004

EVALUATION This problem really concerns the java.io.Serializable interface, rather than the three classes cited in the bug report. In between 1.1 and 1.2, we accidentally added a static final long serialVersionUID field to the java.io.Serializable interface. Note that the JavaDoc for Serializable is now inconsistent: It says "The serialization interface has no methods or fields and serves only to identify the semantics of being serializable." This places classes that implement the Serializable interface but do not have an explicit serialVersionUID in a bind. If it later becomes necessary to provide an explicit serialVersionUID, it is impossible to do so without making the field public or breaking binary compatibility. This is so because classes that implement an interface (e.g., Serializable) inherit its fields (e.g., serialVersionUID). If such a class hides (cf. JLS 8.3, P. 144) such a field (which is implicitly public) with a non-public field, the hidden public field becomes inaccessible. A program that previously accessed the now-hidden field will no longer run. If we leave the erroneously introduced serialVersionUID field in java.io.Serializable, we must make all of our added serialVersionUIDs public from here on out; this would add a huge amount of clutter to our APIs, and engineers would generally forget to do it, as it violates common practice. Further, the spec for java.io.Serializable would remain inconsistent. Finally, the specs for all classes that implement java.io.Serializable and do not provide explicit serialVersionUIDs would remain confusing. Such classes currently inherit the erroneously introduced field, though it has nothing to do with them. The correct solution to this problem is to remove the erroneously introduced serialVersionUID field from java.io.Serializable. joshua.bloch@Eng 1999-04-15
15-04-1999