--- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java Wed May 21 12:52:58 2014 +0200
+++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java Wed May 21 15:38:11 2014 +0200
@@ -651,13 +651,11 @@
* @param newMap Modified {@link PropertyMap}.
*/
private void addToHistory(final Property property, final PropertyMap newMap) {
- if (!properties.isEmpty()) {
- if (history == null) {
- history = new WeakHashMap<>();
- }
+ if (history == null) {
+ history = new WeakHashMap<>();
+ }
- history.put(property, new SoftReference<>(newMap));
- }
+ history.put(property, new SoftReference<>(newMap));
}
/**