8043605: Enable history for empty property maps

Reviewed-by: jlaskey, sundar
This commit is contained in:
Attila Szegedi 2014-05-21 15:38:11 +02:00
parent ce8b91fec8
commit 5ffa8e1bd4

View File

@ -651,13 +651,11 @@ public final class PropertyMap implements Iterable<Object> {
* @param newMap Modified {@link PropertyMap}.
*/
private void addToHistory(final Property property, final PropertyMap newMap) {
if (!properties.isEmpty()) {
if (history == null) {
history = new WeakHashMap<>();
}
history.put(property, new SoftReference<>(newMap));
if (history == null) {
history = new WeakHashMap<>();
}
history.put(property, new SoftReference<>(newMap));
}
/**