[jbosscache-commits] JBoss Cache SVN: r8055 - in core/branches/1.4.X/src/org/jboss/cache: marshall and 1 other directory.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri May 8 18:09:14 EDT 2009


Author: dereed
Date: 2009-05-08 18:09:14 -0400 (Fri, 08 May 2009)
New Revision: 8055

Modified:
   core/branches/1.4.X/src/org/jboss/cache/eviction/RegionManager.java
   core/branches/1.4.X/src/org/jboss/cache/marshall/RegionManager.java
Log:
[JBCACHE-1500] count a duplicate Fqn as a conflict in RegionManager.checkConflict (both eviction and marshall).
This will cause createRegion to throw an exception for a duplicate.


Modified: core/branches/1.4.X/src/org/jboss/cache/eviction/RegionManager.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/eviction/RegionManager.java	2009-05-07 21:11:09 UTC (rev 8054)
+++ core/branches/1.4.X/src/org/jboss/cache/eviction/RegionManager.java	2009-05-08 22:09:14 UTC (rev 8055)
@@ -333,7 +333,7 @@
     */
    public void checkConflict(Fqn fqn) throws RegionNameConflictException
    {
-      for (int i = 0; i < fqn.size(); i++)
+      for (int i = 0; i <= fqn.size(); i++)
       {
          Fqn child = fqn.getFqnChild(i);
          if (regionMap_.containsKey(child))

Modified: core/branches/1.4.X/src/org/jboss/cache/marshall/RegionManager.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/marshall/RegionManager.java	2009-05-07 21:11:09 UTC (rev 8054)
+++ core/branches/1.4.X/src/org/jboss/cache/marshall/RegionManager.java	2009-05-08 22:09:14 UTC (rev 8055)
@@ -201,7 +201,7 @@
      */
     public void checkConflict(Fqn fqn) throws RegionNameConflictException
     {
-        for (int i = 0; i < fqn.size(); i++)
+        for (int i = 0; i <= fqn.size(); i++)
         {
             Fqn child = fqn.getFqnChild(i);
             if (regionMap_.containsKey(child))




More information about the jbosscache-commits mailing list