[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/interceptors/dynamic ...
Jason Thomas Greene
jgreene at jboss.com
Tue Jun 26 18:23:51 EDT 2007
User: jgreene
Date: 07/06/26 18:23:51
Modified: src/org/jboss/cache/pojo/interceptors/dynamic
AbstractCollectionInterceptor.java
Log:
Don't error when the detach is local
Revision Changes Path
1.4 +6 -4 JBossCache/src/org/jboss/cache/pojo/interceptors/dynamic/AbstractCollectionInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractCollectionInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/interceptors/dynamic/AbstractCollectionInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- AbstractCollectionInterceptor.java 21 Jun 2007 01:33:03 -0000 1.3
+++ AbstractCollectionInterceptor.java 26 Jun 2007 22:23:51 -0000 1.4
@@ -18,7 +18,7 @@
* Abstract base class for collection interceptor.
*
* @author Ben Wang
- * @version $Id: AbstractCollectionInterceptor.java,v 1.3 2007/06/21 01:33:03 jgreene Exp $
+ * @version $Id: AbstractCollectionInterceptor.java,v 1.4 2007/06/26 22:23:51 jgreene Exp $
*/
@SuppressWarnings({"CanBeFinal"})
public abstract class AbstractCollectionInterceptor implements BaseInterceptor
@@ -83,11 +83,13 @@
return attached_;
}
- /**
- * Check if the pojo is detached already.
- */
+ // Verify an attached collection is truly attached
public void verifyAttached(Object target)
{
+ // If locally detached, we use the local in-memory copy
+ if (! isAttached())
+ return;
+
if (cache.getCache().get(fqn, PojoInstance.KEY) != null)
return;
More information about the jboss-cvs-commits
mailing list