[jbosscache-commits] JBoss Cache SVN: r6303 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Jul 16 09:57:30 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-07-16 09:57:30 -0400 (Wed, 16 Jul 2008)
New Revision: 6303

Modified:
   benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java
Log:
Null check

Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java	2008-07-16 13:53:25 UTC (rev 6302)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java	2008-07-16 13:57:30 UTC (rev 6303)
@@ -1,15 +1,12 @@
 package org.cachebench.cachewrappers;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.cachebench.CacheWrapper;
 import org.jboss.cache.Cache;
 import org.jboss.cache.DefaultCacheFactory;
 import org.jboss.cache.Fqn;
-import org.jboss.cache.CacheSPI;
 import org.jboss.cache.config.Option;
-import org.jboss.cache.marshall.NodeData;
-import org.jboss.cache.buddyreplication.GravitateResult;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.cachebench.CacheWrapper;
 
 import java.util.Map;
 
@@ -24,7 +21,7 @@
    public void init(Map parameters) throws Exception
    {
       log.info("Creating cache with the following configuration: " + parameters);
-      cache = new DefaultCacheFactory().createCache((String)parameters.get("config"));
+      cache = new DefaultCacheFactory().createCache((String) parameters.get("config"));
       log.info("Running cache with following config: " + cache.getConfiguration());
       log.info("Running follwing JBossCacheVersion: " + org.jboss.cache.Version.version);
       log.info("Running follwing JBossCacheCodeName: " + org.jboss.cache.Version.codename);
@@ -60,7 +57,7 @@
 
    public int getNumMembers()
    {
-      return cache.getMembers().size();
+      return cache.getMembers() == null ? 0 : cache.getMembers().size();
    }
 
    public String getInfo()




More information about the jbosscache-commits mailing list