abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r685463 - in /incubator/abdera/java/trunk/client/src: main/java/org/apache/abdera/protocol/client/AbderaClient.java test/java/org/apache/abdera/test/client/cache/CacheTest.java
Date Wed, 13 Aug 2008 06:44:55 GMT
Author: calavera
Date: Tue Aug 12 23:44:54 2008
New Revision: 685463

URL: http://svn.apache.org/viewvc?rev=685463&view=rev
Log:
[ABDERA-196]: CacheFactory interface is incorrectly referenced in AbderaClient. Thanks to
Aaron Evans.

I've also added a test case.

Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
    incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java?rev=685463&r1=685462&r2=685463&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
Tue Aug 12 23:44:54 2008
@@ -39,6 +39,7 @@
 import org.apache.abdera.protocol.client.cache.CacheFactory;
 import org.apache.abdera.protocol.client.cache.CachedResponse;
 import org.apache.abdera.protocol.client.cache.LRUCache;
+import org.apache.abdera.protocol.client.cache.LRUCacheFactory;
 import org.apache.abdera.protocol.client.cache.Cache.Disposition;
 import org.apache.abdera.protocol.client.util.BaseRequestEntity;
 import org.apache.abdera.protocol.client.util.EntityProviderRequestEntity;
@@ -130,8 +131,8 @@
   private CacheFactory initCacheFactory() {
     CacheFactory cacheFactory = 
       (CacheFactory)ServiceUtil.newInstance(
-        "org.apache.abdera.protocol.cache.CacheFactory",
-        "org.apache.abdera.protocol.cache.LRUCacheFactory", 
+        CacheFactory.class.getName(),
+        LRUCacheFactory.class.getName(), 
         abdera);
     return cacheFactory;
   }

Modified: incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java?rev=685463&r1=685462&r2=685463&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
(original)
+++ incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/cache/CacheTest.java
Tue Aug 12 23:44:54 2008
@@ -444,4 +444,10 @@
     String resp = new String(out.toByteArray());
     return resp.trim();
   }
+  
+  @Test
+  public void testInitCache() {	  
+	  AbderaClient client = new AbderaClient();	  
+	  assertNotNull(client.getCache());
+  }
 }



Mime
View raw message