> > reference so that the entry will not be gc'ed,
>
> Then why use .weakKeys() for the map at all?
To have the value gc'ed when I remove my strong reference. Just for
what this map has been built for.
The point is, at the moment you can not access the value using a key
which implements .equals() and .hashCode(). This is a problem at least
if you have to deal with serialization/deserialization.
It is clear, that the value might have been gc'ed as the map does not
know anything about my serialized key, but this is an expected
behaviour.
Ciao,
Mario