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

Ben Wang bwang at jboss.com
Tue Nov 14 07:28:07 EST 2006


  User: bwang   
  Date: 06/11/14 07:28:07

  Modified:    src-50/org/jboss/cache/pojo/impl 
                        CollectionClassHandler.java
  Log:
  upd
  
  Revision  Changes    Path
  1.12      +8 -2      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.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- CollectionClassHandler.java	9 Nov 2006 16:53:28 -0000	1.11
  +++ CollectionClassHandler.java	14 Nov 2006 12:28:07 -0000	1.12
  @@ -32,7 +32,7 @@
    *
    * @author Ben Wang
    *         Date: Aug 4, 2005
  - * @version $Id: CollectionClassHandler.java,v 1.11 2006/11/09 16:53:28 bwang Exp $
  + * @version $Id: CollectionClassHandler.java,v 1.12 2006/11/14 12:28:07 bwang Exp $
    */
   class CollectionClassHandler
   {
  @@ -223,6 +223,9 @@
         if(set.remove(set))
         {
            set.add(obj); // replace with proxy
  +         throw new PojoCacheException("CollectionClassHandler.checkSetRecursion(): " +
  +         "detect a recursive set (e.g., set inside the same set). This will fail to " +
  +         "replicate even outside of PojoCache with HashSet. " +set);
         }
      }
   
  @@ -241,8 +244,11 @@
            Object v = m.get(k);
            if( v == map )
            {
  +            throw new PojoCacheException("CollectionClassHandler.checkMapRecursion(): " +
  +            "detect a recursive map (e.g., map inside the same map). This will fail to " +
  +            "replicate even outside of PojoCache with HashMap because of hashCode. " +map);
               // recursion here, replace it with proxy
  -            map.put(k, obj);
  +//            map.put(k, obj);
            }
         }
      }
  
  
  



More information about the jboss-cvs-commits mailing list