[jboss-svn-commits] JBL Code SVN: r14823 - in labs/shotoku/trunk: shotoku-svn/src/java/org/jboss/shotoku/svn/service and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 3 05:52:17 EDT 2007


Author: adamw
Date: 2007-09-03 05:52:17 -0400 (Mon, 03 Sep 2007)
New Revision: 14823

Modified:
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemUser.java
   labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java
Log:
Keys cannot be null

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java	2007-09-03 09:39:14 UTC (rev 14822)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java	2007-09-03 09:52:17 UTC (rev 14823)
@@ -35,7 +35,7 @@
  * ({@link CacheItem#create(CacheItemDataSource, org.jboss.cache.Fqn, String, long)}).
  * @param <K> Type of keys in the cache. The keys
  * should bahave well as map keys (most probably, the hashCode() and
- * equals() methods should be overriden).
+ * equals() methods should be overriden). Moreover, they cannot be null.
  * @param <T> Type of the values bound to the keys in the cache.
  * @author <a href="mailto:adam.warski at jboss.org">Adam Warski</a>
  */
@@ -43,7 +43,7 @@
 	/**
      * Called by the service periodically to update the object held in the
      * cache, bound to the given key. The value current held in the cache can be changed or not.
-     * @param key Key of the object to update.
+     * @param key Key of the object to update. Cannot be null.
      * @param currentObject Current value held in the cache.
      * @return Can return either:
      * <ul>
@@ -60,7 +60,7 @@
     /**
      * Called when the user demands an object which hasn't been accessed
      * before, and thus, which hasn't been yet initialized.
-     * @param key Key of the object to initialize.
+     * @param key Key of the object to initialize. Cannot be null.
      * @return Can return either:
      * <ul>
      * <li>{@link ValueInit#realValue(Object)} to indicate that the value returned is a "real" one;

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemUser.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemUser.java	2007-09-03 09:39:14 UTC (rev 14822)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemUser.java	2007-09-03 09:52:17 UTC (rev 14823)
@@ -52,7 +52,7 @@
      * If this object is not in the cache, it will be initialized (using the
      * {@link CacheItemDataSource#init(Object)} method of a data source
      * that was passed to {@link CacheItem#create(CacheItemDataSource)}).
-     * @param key Key of the object to get.
+     * @param key Key of the object to get. Cannot be null.
      * @return Value of the object.
      */
 	public T get(K key);

Modified: labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java
===================================================================
--- labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java	2007-09-03 09:39:14 UTC (rev 14822)
+++ labs/shotoku/trunk/shotoku-svn/src/java/org/jboss/shotoku/svn/service/SvnServiceImpl.java	2007-09-03 09:52:17 UTC (rev 14823)
@@ -77,7 +77,7 @@
         repositories = new ConcurrentHashMap<String, SvnRepository>();
 
         svnCacheItem = CacheItem.create(new SvnCacheItemDataSource(this));
-        svnCacheItem.get(null);
+        svnCacheItem.get(new Object());
         svnCacheItem.setInterval(ContentManager.getProperty(
                 SvnTools.PROPERTY_INTERVAL, SvnTools.DEFAULT_TIMER_INTERVAL));
         setFirstUpdate(ContentManager.getProperty(




More information about the jboss-svn-commits mailing list