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

Manik Surtani msurtani at jboss.com
Fri Oct 13 10:53:28 EDT 2006


  User: msurtani
  Date: 06/10/13 10:53:28

  Modified:    src/org/jboss/cache/marshall   TreeCacheMarshaller200.java
  Added:       src/org/jboss/cache/marshall   InactiveRegionException.java
  Log:
  fixed breaking UTs
  
  Revision  Changes    Path
  1.7       +7 -32     JBossCache/src/org/jboss/cache/marshall/TreeCacheMarshaller200.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheMarshaller200.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/marshall/TreeCacheMarshaller200.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- TreeCacheMarshaller200.java	12 Oct 2006 23:03:57 -0000	1.6
  +++ TreeCacheMarshaller200.java	13 Oct 2006 14:53:28 -0000	1.7
  @@ -8,7 +8,6 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.CacheException;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.GlobalTransaction;
   import org.jboss.cache.Region;
  @@ -91,8 +90,6 @@
            // This may be null if the call being unmarshalled is
            // not region-based
            String fqn = (String) unmarshallObject(in, refMap);
  -         try
  -         {
               Region region = null;
               if (fqn != null)
               {
  @@ -100,11 +97,6 @@
               }
               retValue = region == null ? unmarshallObject(in, refMap) : unmarshallObject(in, region.getClassLoader(), refMap);
            }
  -         catch (TreeCacheMarshaller200.InactiveRegionException e)
  -         {
  -            throw new RuntimeException("Invocation called on an inactive region [" + fqn + "]!");
  -         }
  -      }
         else
         {
            retValue = unmarshallObject(in, refMap);
  @@ -113,7 +105,7 @@
         return retValue;
      }
   
  -   private Region findRegion(String fqn) throws TreeCacheMarshaller200.InactiveRegionException
  +   private Region findRegion(String fqn) throws InactiveRegionException
      {
         Region region;
         // obtain a region from MarshRegionManager, if not, will use default.
  @@ -123,13 +115,13 @@
         {
            if (!region.isActive())
            {
  -            throw new TreeCacheMarshaller200.InactiveRegionException();
  +            throw new InactiveRegionException();
            }
         }
         else if (defaultInactive)
         {
            // No region but default inactive means region is inactive
  -         throw new TreeCacheMarshaller200.InactiveRegionException();
  +         throw new InactiveRegionException();
         }
   
         return region;
  @@ -503,21 +495,4 @@
      }
   
   
  -   class InactiveRegionException extends CacheException
  -   {
  -      public InactiveRegionException()
  -      {
  -         super();
  -      }
  -
  -      public InactiveRegionException(String msg)
  -      {
  -         super(msg);
  -      }
  -
  -      public InactiveRegionException(String msg, Throwable cause)
  -      {
  -         super(msg, cause);
  -      }
  -   }
   }
  
  
  
  1.1      date: 2006/10/13 14:53:28;  author: msurtani;  state: Exp;JBossCache/src/org/jboss/cache/marshall/InactiveRegionException.java
  
  Index: InactiveRegionException.java
  ===================================================================
  package org.jboss.cache.marshall;
  
  import org.jboss.cache.CacheException;
  
  /**
   * Thrown by a {@link org.jboss.cache.marshall.Marshaller} instance when attempting to perform an operation on an inactive region.
   *
   * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
   * @since 2.0.0
   */
  public class InactiveRegionException extends CacheException
  {
     public InactiveRegionException()
     {
        super();
     }
  
     public InactiveRegionException(String msg)
     {
        super(msg);
     }
  
     public InactiveRegionException(String msg, Throwable cause)
     {
        super(msg, cause);
     }
  }
  
  
  



More information about the jboss-cvs-commits mailing list