[jboss-cvs] JBossCache/src/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Mon Jan 29 11:55:48 EST 2007


  User: msurtani
  Date: 07/01/29 11:55:48

  Modified:    src/org/jboss/cache  RegionManager.java
  Log:
  Fixed UT failures and a bug in region selection loop
  
  Revision  Changes    Path
  1.29      +8 -2      JBossCache/src/org/jboss/cache/RegionManager.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RegionManager.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/RegionManager.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- RegionManager.java	19 Jan 2007 16:02:07 -0000	1.28
  +++ RegionManager.java	29 Jan 2007 16:55:48 -0000	1.29
  @@ -687,11 +687,12 @@
       */
      public List<Region> getAllRegions(Region.Type type)
      {
  -      List<Region> regions = new ArrayList<Region>(regionsRegistry.values());
  +      List<Region> regions = null;
   
         if (type != Region.Type.ANY)
         {
  -         // we need to loop thru the regions and weed out the unwanted types.
  +         regions = new ArrayList<Region>();
  +         // we need to loop thru the regions and only select specific regions to rtn.
            for (Region r : regionsRegistry.values())
            {
               if ((type == Region.Type.EVICTION && r.getEvictionPolicy() != null && evictionTimerTask.isRegionRegisteredForProcessing(r)) ||
  @@ -699,6 +700,11 @@
                  regions.add(r);
            }
         }
  +      else
  +      {
  +         // put all regions
  +         regions = new ArrayList<Region>(regionsRegistry.values());
  +      }
   
         Collections.sort(regions);
   
  
  
  



More information about the jboss-cvs-commits mailing list