openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r833150 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
Date Thu, 05 Nov 2009 19:54:32 GMT
Author: allee8285
Date: Thu Nov  5 19:54:32 2009
New Revision: 833150

URL: http://svn.apache.org/viewvc?rev=833150&view=rev
Log:
OPENJPA-1375 - Clean _plans IdentityHashMap when clear or close is called.

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=833150&r1=833149&r2=833150&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
Thu Nov  5 19:54:32 2009
@@ -33,7 +33,6 @@
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.IdentityHashMap;
 import java.util.Map;
 import java.util.Set;
@@ -50,7 +49,6 @@
 import javax.persistence.metamodel.Metamodel;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.LogFactory;
 import org.apache.openjpa.conf.Compatibility;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.ee.ManagedRuntime;
@@ -1113,6 +1111,7 @@
     public void clear() {
         assertNotCloseInvoked();
         _broker.detachAll(this, false);
+        _plans.clear();
     }
 
     public Object getDelegate() {
@@ -1245,6 +1244,7 @@
     public void close() {
         assertNotCloseInvoked();
         _broker.close();
+        _plans.clear();
     }
 
     public boolean isOpen() {
@@ -1473,13 +1473,13 @@
             }
         }
 
-        protected Class resolveClass(ObjectStreamClass classDesc)
+        protected Class<?> resolveClass(ObjectStreamClass classDesc)
             throws IOException, ClassNotFoundException {
 
             String cname = classDesc.getName();
             if (cname.startsWith("[")) {
                 // An array
-                Class component;		// component class
+                Class<?> component;		// component class
                 int dcount;			    // dimension
                 for (dcount=1; cname.charAt(dcount)=='['; dcount++) ;
                 if (cname.charAt(dcount) == 'L') {
@@ -1505,7 +1505,7 @@
          * If this is a generated subclass, look up the corresponding Class
          * object via metadata.
          */
-        private Class lookupClass(String className)
+        private Class<?> lookupClass(String className)
             throws ClassNotFoundException {
             try {
                 return Class.forName(className);



Mime
View raw message