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

Manik Surtani manik at jboss.org
Mon Mar 12 14:13:48 EDT 2007


  User: msurtani
  Date: 07/03/12 14:13:48

  Modified:    src/org/jboss/cache/pojo/util  AopUtil.java
  Log:
  JBCACHE-1005
  
  Revision  Changes    Path
  1.3       +14 -13    JBossCache/src/org/jboss/cache/pojo/util/AopUtil.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AopUtil.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/util/AopUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- AopUtil.java	20 Feb 2007 13:06:46 -0000	1.2
  +++ AopUtil.java	12 Mar 2007 18:13:48 -0000	1.3
  @@ -11,13 +11,12 @@
   import org.jboss.aop.Advised;
   import org.jboss.aop.InstanceAdvisor;
   import org.jboss.aop.advice.Interceptor;
  -import org.jboss.cache.Fqn;
   import org.jboss.cache.Cache;
  +import org.jboss.cache.Fqn;
   import org.jboss.cache.Region;
  +import org.jboss.cache.pojo.InternalConstant;
   import org.jboss.cache.pojo.interceptors.dynamic.BaseInterceptor;
   import org.jboss.cache.pojo.interceptors.dynamic.CacheFieldInterceptor;
  -import org.jboss.cache.pojo.InternalConstant;
  -import org.jboss.cache.pojo.InvocationContext;
   import org.jboss.util.id.GUID;
   
   import java.io.Serializable;
  @@ -117,7 +116,7 @@
      public static void checkObjectType(Object obj)
      {
         if (obj == null) return;
  -      if (! (obj instanceof Advised))
  +      if (!(obj instanceof Advised))
         {
            boolean allowedType = (obj instanceof Serializable) || (obj.getClass().isArray() && obj.getClass().getComponentType().isPrimitive());
   
  @@ -153,24 +152,25 @@
         // Extract the original id as it will be fqn - JBOSS_INTERNAL_ID_SEP
         // Also the current fqn can be like: /person/__JBossInternal__/test1/_ID_, for region specific ops
         Fqn trueId = null;
  -      if(fqn.hasElement(InternalConstant.JBOSS_INTERNAL_ID_SEP_STRING))
  +      if (fqn.hasElement(InternalConstant.JBOSS_INTERNAL_ID_SEP_STRING))
         {
            List list = new ArrayList();
  -         for(int i =0; i < fqn.size(); i++)
  +         for (int i = 0; i < fqn.size(); i++)
            {
  -            if( fqn.get(i).equals(InternalConstant.JBOSS_INTERNAL_STRING) )
  +            if (fqn.get(i).equals(InternalConstant.JBOSS_INTERNAL_STRING))
               {
                  continue;
               }
   
  -            if( fqn.get(i).equals(InternalConstant.JBOSS_INTERNAL_ID_SEP_STRING) )
  +            if (fqn.get(i).equals(InternalConstant.JBOSS_INTERNAL_ID_SEP_STRING))
               {
                  break;
               }
               list.add(fqn.get(i));
            }
            trueId = new Fqn(list);
  -      } else
  +      }
  +      else
         {
            trueId = fqn;
         }
  @@ -180,18 +180,19 @@
         // Use guid that is cluster-wide unique.
         GUID guid = new GUID();
   
  -      if(region == null || region.getFqn().equals(Fqn.ROOT))
  +      if (region == null || region.getFqn().equals(Fqn.ROOT))
         {
            // Move id under JBInternal to promote concurrency
            Fqn f0 = new Fqn(InternalConstant.JBOSS_INTERNAL, trueId);
            Fqn f = new Fqn(f0, InternalConstant.JBOSS_INTERNAL_ID_SEP);
            return new Fqn(f, Fqn.fromString(guid.toString()));
  -      } else
  +      }
  +      else
         {
            // Create it under region first.
            Fqn rf = region.getFqn();
            // Extract rest of fqn id
  -         Fqn childf = trueId.getFqnChild(rf.size(), trueId.size());
  +         Fqn childf = trueId.getSubFqn(rf.size(), trueId.size());
            Fqn f0 = new Fqn(InternalConstant.JBOSS_INTERNAL, childf);
            Fqn f = new Fqn(f0, InternalConstant.JBOSS_INTERNAL_ID_SEP);
            Fqn f1 = new Fqn(rf, f);
  
  
  



More information about the jboss-cvs-commits mailing list