|
Quick Lists
|
|
Bug ID:
|
6420847
|
|
Votes
|
0
|
|
Synopsis
|
(coll) Clarify that serializable collections need serializable elements
|
|
Category
|
java:classes_util
|
|
Reported Against
|
|
|
Release Fixed
|
|
|
State
|
6-Fix Understood,
bug
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
|
|
Submit Date
|
02-MAY-2006
|
|
Description
|
A DESCRIPTION OF THE PROBLEM :
HashMap documentation is lacking information on using classes as keys. It has to state which interface (probably Serializable) should be implemented by the class that is used as key in the HashMap. Apparently ordinary classes can't be used as keys, but String's can be used. However Java doesn't warn you at all if you try to get or put with a key that is an instance of a custom class (a class that doesn't implement any interfaces).
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html
Posted Date : 2006-05-02 20:55:07.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
I'm not sure exactly what the submitter's problem is, but...
it would be good to add specification to Serializable collections
that their elements must also be Serializable if the collection
is to be serialized. That is, there is no static type checking of
the serializability of collections.
Posted Date : 2006-05-03 23:21:41.0
|
|
Comments
|
Submitted On 12-OCT-2006
i want to know, which collections r serializable,
pls send me names with description
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |