[jboss-cvs] JBossCache/src-50/org/jboss/cache/pojo/impl ...

Ben Wang bwang at jboss.com
Sun Sep 17 04:28:33 EDT 2006


  User: bwang   
  Date: 06/09/17 04:28:33

  Modified:    src-50/org/jboss/cache/pojo/impl 
                        CollectionClassHandler.java
  Log:
  JIRA JBCACHE-76o proper notification
  
  Revision  Changes    Path
  1.9       +12 -7     JBossCache/src-50/org/jboss/cache/pojo/impl/CollectionClassHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CollectionClassHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/impl/CollectionClassHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- CollectionClassHandler.java	5 Sep 2006 06:11:25 -0000	1.8
  +++ CollectionClassHandler.java	17 Sep 2006 08:28:33 -0000	1.9
  @@ -31,7 +31,7 @@
    *
    * @author Ben Wang
    *         Date: Aug 4, 2005
  - * @version $Id: CollectionClassHandler.java,v 1.8 2006/09/05 06:11:25 bwang Exp $
  + * @version $Id: CollectionClassHandler.java,v 1.9 2006/09/17 08:28:33 bwang Exp $
    */
   class CollectionClassHandler
   {
  @@ -86,6 +86,17 @@
   
         type = pCache_.getCachedType(obj.getClass());
   
  +      //JBCACHE-760: for collection - put initialized aopInstance in fqn
  +      if (!(obj instanceof Map || obj instanceof List || obj instanceof Set)) {
  +          return;
  +      }
  +
  +      // Always initialize the ref count so that we can mark this as an AopNode.
  +      PojoInstance pojoInstance = InternalHelper.initializeAopInstance(referencingFqn);
  +      pojoInstance.set(obj);
  +      pojoInstance.setPojoClass(type.getType());
  +      cache_.put(fqn, PojoInstance.KEY, pojoInstance);
  +
         if (obj instanceof Map)
         {
            if (log.isDebugEnabled())
  @@ -179,12 +190,6 @@
   
         if (isCollection)
         {
  -         // Always initialize the ref count so that we can mark this as an AopNode.
  -         PojoInstance pojoInstance = InternalHelper.initializeAopInstance(referencingFqn);
  -         pojoInstance.set(obj);
  -         pojoInstance.setPojoClass(type.getType());
  -         cache_.put(fqn, PojoInstance.KEY, pojoInstance);
  -
            // Attach pojoReference to that interceptor
            BaseInterceptor baseInterceptor = (BaseInterceptor) CollectionInterceptorUtil.getInterceptor(
                    (ClassProxy) obj);
  
  
  



More information about the jboss-cvs-commits mailing list