mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-20 10:27:52 +00:00
8043605: Enable history for empty property maps
Reviewed-by: jlaskey, sundar
This commit is contained in:
parent
ce8b91fec8
commit
5ffa8e1bd4
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user