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

Manik Surtani msurtani at jboss.com
Sat Dec 30 14:48:47 EST 2006


  User: msurtani
  Date: 06/12/30 14:48:47

  Modified:    src/org/jboss/cache/factories  InterceptorChainFactory.java
  Log:
  Genericised, autoboxed
  
  Revision  Changes    Path
  1.36      +12 -12    JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InterceptorChainFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -b -r1.35 -r1.36
  --- InterceptorChainFactory.java	30 Dec 2006 17:49:57 -0000	1.35
  +++ InterceptorChainFactory.java	30 Dec 2006 19:48:47 -0000	1.36
  @@ -52,13 +52,13 @@
   
      private Interceptor createInterceptor(String classname, CacheSPI cache) throws ClassNotFoundException, IllegalAccessException, InstantiationException
      {
  -      Class clazz = Util.loadClass(classname);
  +      Class<Interceptor> clazz = Util.loadClass(classname);
         return createInterceptor(clazz, cache);
      }
   
  -   private Interceptor createInterceptor(Class clazz, CacheSPI cache) throws IllegalAccessException, InstantiationException
  +   private Interceptor createInterceptor(Class<? extends Interceptor> clazz, CacheSPI cache) throws IllegalAccessException, InstantiationException
      {
  -      Interceptor i = (Interceptor) clazz.newInstance();
  +      Interceptor i = clazz.newInstance();
         i.setCache(cache);
         i.setStatisticsEnabled(cache.getConfiguration().getExposeManagementStatistics());
         return i;
  @@ -125,17 +125,17 @@
       */
      private Interceptor createPessimisticInterceptorChain(CacheImpl cache) throws IllegalAccessException, InstantiationException, ClassNotFoundException
      {
  -      Interceptor call_interceptor = null;
  -      Interceptor lock_interceptor = null;
  +      Interceptor call_interceptor;
  +      Interceptor lock_interceptor;
         Interceptor repl_interceptor = null;
         Interceptor cache_loader_interceptor = null;
         Interceptor cache_store_interceptor = null;
  -      Interceptor unlock_interceptor = null;
  +      Interceptor unlock_interceptor;
         Interceptor passivation_interceptor = null;
         Interceptor activation_interceptor = null;
  -      Interceptor cacheMgmtInterceptor = null;
  -      Interceptor txInterceptor = null;
  -      Interceptor eviction_interceptor = null;
  +      Interceptor cacheMgmtInterceptor;
  +      Interceptor txInterceptor;
  +      Interceptor eviction_interceptor;
         Interceptor dataGravitatorInterceptor = null;
         Interceptor invocationCtxInterceptor = createInterceptor(InvocationContextInterceptor.class, cache);
         Interceptor first = null;
  @@ -389,10 +389,10 @@
   
      private Interceptor createOptimisticInterceptorChain(CacheImpl cache) throws IllegalAccessException, InstantiationException, ClassNotFoundException
      {
  -      Interceptor txInterceptor = null, replicationInterceptor = null, lockInterceptor = null, validationInterceptor = null;
  -      Interceptor createIfNotExistsInterceptor = null, nodeInterceptor = null, invokerInterceptor = null, activationInterceptor = null;
  +      Interceptor txInterceptor, replicationInterceptor = null, lockInterceptor, validationInterceptor;
  +      Interceptor createIfNotExistsInterceptor, nodeInterceptor, invokerInterceptor, activationInterceptor = null;
         Interceptor passivationInterceptor = null, cacheLoaderInterceptor = null, cacheStoreInterceptor = null, first = null;
  -      Interceptor cacheMgmtInterceptor = null, evictionInterceptor = null, dataGravitatorInterceptor = null;
  +      Interceptor cacheMgmtInterceptor, evictionInterceptor = null, dataGravitatorInterceptor = null;
         Interceptor invocationCtxInterceptor = createInterceptor(InvocationContextInterceptor.class, cache);
   
         CacheLoaderManager cacheLoaderManager = cache.getCacheLoaderManager();
  
  
  



More information about the jboss-cvs-commits mailing list