[jboss-cvs] JBossCache/src-50/org/jboss/cache/pojo/util ...
Manik Surtani
msurtani at jboss.com
Tue Jan 9 22:55:40 EST 2007
User: msurtani
Date: 07/01/09 22:55:40
Modified: src-50/org/jboss/cache/pojo/util CacheApiUtil.java
Log:
fixed some api issues
Revision Changes Path
1.9 +3 -6 JBossCache/src-50/org/jboss/cache/pojo/util/CacheApiUtil.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheApiUtil.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/util/CacheApiUtil.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- CacheApiUtil.java 4 Jan 2007 05:35:39 -0000 1.8
+++ CacheApiUtil.java 10 Jan 2007 03:55:40 -0000 1.9
@@ -13,14 +13,13 @@
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Option;
-import java.util.Map;
import java.util.Set;
/**
* Utility for the 2.0 Cache API
*
* @author Ben Wang
- * @version $Id: CacheApiUtil.java,v 1.8 2007/01/04 05:35:39 msurtani Exp $
+ * @version $Id: CacheApiUtil.java,v 1.9 2007/01/10 03:55:40 msurtani Exp $
*/
public class CacheApiUtil
{
@@ -58,12 +57,10 @@
if (cache.getCacheLoaderManager() != null)
{
// Has cache loader
- return (cache.get(fqn, key) != null) ? true : false;
+ return (cache.get(fqn, key) != null);
}
NodeSPI node = cache.getRoot().getChildDirect(fqn);
- if (node == null) return false;
- Map map = node.getDataDirect();
- return (map.keySet().contains(key)) ? true : false;
+ return node != null && node.getKeysDirect().contains(key);
}
}
More information about the jboss-cvs-commits
mailing list