JDK-8068427 : Hashtable deserialization reconstitutes table with wrong capacity
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-01-04
  • Updated: 2021-03-03
  • Resolved: 2015-01-21
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 6 JDK 8 JDK 9 Other
6u121Fixed 8u102Fixed 9 b48Fixed openjdk7uFixed
Related Reports
Relates :  
Description
Deserialization reconstitutes internal 'table' array with wrong length. This is the output of the test:

Serialized Hashtable of size=10 has internal table.length=14 but de-serialized table.length=10
Serialized Hashtable of size=50 has internal table.length=67 but de-serialized table.length=42
Serialized Hashtable of size=500 has internal table.length=667 but de-serialized table.length=403
Serialized Hashtable of size=5000 has internal table.length=6667 but de-serialized table.length=4003

Comments
Here's proposed fix: http://cr.openjdk.java.net/~plevart/jdk9-dev/Hashtable.8068427/webrev.01/
04-01-2015