Ostatnio czytałem na wiki o Flyweight pattern
http://en.wikipedia.org/wiki/Flyweight_pattern#Java

Poczytałem też definicję WeakHashMap i mam wątpliwości co do tego kodu:

flyweightData.put(data, data);

http://java.sun.com/javase/6/docs/api/java/util/WeakHashMap.html

The value objects in a WeakHashMap are held by ordinary strong references. Thus care should be taken to ensure that value objects do not strongly refer to their own keys, either directly or indirectly, since that will prevent the keys from being discarded.

Czy w takim razie nie powinno to być zapisane tak:

flyweightData.put(data, new WeakReferences(data));

Jeżeli mam rację, to zmienię to na wiki, ale chcę się wcześniej upewnić.