diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java index 52250b830..da3188947 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java @@ -120,12 +120,13 @@ public abstract class AbstractQueryCache } else { Collection changedTypes = ev.getTypes(); HashMap changedClasses = - new HashMap(); + new HashMap(); + Long tstamp = new Long(System.currentTimeMillis()); for (Object o: changedTypes) { String name = ((Class) o).getName(); - if(!changedClasses.containsKey(name)) - changedClasses.put(name, - new Long(System.currentTimeMillis())); + if(!changedClasses.containsKey(name)) { + changedClasses.put(name, tstamp ); + } } // Now update entity timestamp map updateEntityTimestamp(changedClasses);