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

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


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

  Modified:    src-50/org/jboss/cache/pojo/jmx  JmxUtil.java
  Log:
  Genericised, autoboxed
  
  Revision  Changes    Path
  1.6       +17 -17    JBossCache/src-50/org/jboss/cache/pojo/jmx/JmxUtil.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JmxUtil.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/jmx/JmxUtil.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- JmxUtil.java	14 Nov 2006 21:53:00 -0000	1.5
  +++ JmxUtil.java	30 Dec 2006 19:48:50 -0000	1.6
  @@ -16,7 +16,7 @@
    * Various JMX related utilities
    *
    * @author Ben Wang
  - * @version $Id: JmxUtil.java,v 1.5 2006/11/14 21:53:00 bstansberry Exp $
  + * @version $Id: JmxUtil.java,v 1.6 2006/12/30 19:48:50 msurtani Exp $
    */
   public class JmxUtil extends org.jboss.cache.jmx.JmxUtil
   {
  @@ -39,7 +39,7 @@
      public static String getPojoCacheObjectName(org.jboss.cache.pojo.PojoCache cache)
      {
         // get the cache's registration name
  -      String tmpName = getCacheObjectName((CacheSPI)cache.getCache());
  +      String tmpName = getCacheObjectName((CacheSPI) cache.getCache());
         String newName = null;
         if (tmpName.startsWith(PREFIX))
         {
  @@ -49,9 +49,9 @@
         {
            newName = tmpName.replaceFirst(JBOSS_CACHE_DOMAIN, POJO_CACHE_DOMAIN);
         }
  -      else if (tmpName.indexOf(CACHE_TYPE_KEY) > -1)
  +      else if (tmpName.contains(CACHE_TYPE_KEY))
         {
  -         if (tmpName.indexOf(POJO_CACHE_TYPE) > -1)
  +         if (tmpName.contains(POJO_CACHE_TYPE))
               throw new IllegalStateException("Plain Cache ObjectName should not include " + POJO_CACHE_TYPE);
            
            int start = tmpName.indexOf(POJO_CACHE_TYPE);
  @@ -80,9 +80,9 @@
         {
            plainName = pojoCacheObjectName.replaceFirst(POJO_CACHE_DOMAIN, JBOSS_CACHE_DOMAIN);
         }
  -      else if (pojoCacheObjectName.indexOf(CACHE_TYPE_KEY) > -1)
  +      else if (pojoCacheObjectName.contains(CACHE_TYPE_KEY))
         {
  -         if (pojoCacheObjectName.indexOf(PLAIN_CACHE_TYPE) > -1)
  +         if (pojoCacheObjectName.contains(PLAIN_CACHE_TYPE))
               throw new IllegalStateException("PojoCache ObjectName should not include " + PLAIN_CACHE_TYPE);
            
            int start = pojoCacheObjectName.indexOf(PLAIN_CACHE_TYPE);
  
  
  



More information about the jboss-cvs-commits mailing list