JDK-7028133 : RegularEnumSet serialVersionUID changed, causes test/java/util/EnumSet/BogusEnumSet.java to fail
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-03-16
  • Updated: 2022-03-10
  • Resolved: 2011-04-27
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.
JDK 7
7 b136Fixed
Related Reports
Relates :  
Relates :  
Description
test/java/util/EnumSet/BogusEnumSet.java failing is failing in the jdk7/tl forest since 7014637 was pushed.

--------------------------------------------------
TEST: java/util/EnumSet/BogusEnumSet.java
JDK under test: (/tmp/jprt/T1/T/132601.ab23780/testproduct/solaris_i586_5.10-product)
java version "1.7.0-internal"
Java(TM) SE Runtime Environment (build 1.7.0-internal-201103161326.ab23780.jdk-b00)
Java HotSpot(TM) Client VM (build 21.0-b03, mixed mode, sharing)

ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.297 seconds
messages:
command: build BogusEnumSet
reason: Named class compiled on demand
elapsed time (seconds): 0.297

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.297 seconds
messages:
command: compile /tmp/jprt/T1/T/132601.ab23780/source/test/java/util/EnumSet/BogusEnumSet.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.297

ACTION: main -- Failed. Execution failed: `main' threw exception: java.io.InvalidClassException: java.util.RegularEnumSet; local class incompatible: stream classdesc serialVersionUID = 3411599620347842686, local class serialVersionUID = -3432557437974414533
REASON: Assumed action based on file name: run main BogusEnumSet 
TIME:   0.006 seconds
messages:
command: main BogusEnumSet
reason: Assumed action based on file name: run main BogusEnumSet 
elapsed time (seconds): 0.006
STDOUT:
STDERR:
java.io.InvalidClassException: java.util.RegularEnumSet; local class incompatible: stream classdesc serialVersionUID = 3411599620347842686, local class serialVersionUID = -3432557437974414533
	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:579)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
	at BogusEnumSet.deserialize(BogusEnumSet.java:89)
	at BogusEnumSet.main(BogusEnumSet.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.io.InvalidClassException
JavaTest Message: shutting down test


TEST RESULT: Failed. Execution failed: `main' threw exception: java.io.InvalidClassException: java.util.RegularEnumSet; local class incompatible: stream classdesc serialVersionUID = 3411599620347842686, local class serialVersionUID = -3432557437974414533
--------------------------------------------------

Comments
EVALUATION Synopsis says it all, need to add serialVersionUID to java.util.RegularEnumSet and java.util.JumboEnumSet.
16-03-2011