[infinispan-commits] Infinispan SVN: r1685 - in trunk/server: hotrod/src/main/scala/org/infinispan/server/hotrod and 1 other directories.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Tue Apr 13 02:56:41 EDT 2010


Author: galder.zamarreno at jboss.com
Date: 2010-04-13 02:56:41 -0400 (Tue, 13 Apr 2010)
New Revision: 1685

Modified:
   trunk/server/core/src/main/scala/org/infinispan/server/core/CacheValue.scala
   trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/CacheKey.scala
   trunk/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodReplicationTest.scala
Log:
[ISPN-397] (StateTransferException: Expected a delimiter, recieved class java.util.concurrent.CopyOnWriteArraySet) Fixed by reading byte arrays using readFully() rather than read() method.

Modified: trunk/server/core/src/main/scala/org/infinispan/server/core/CacheValue.scala
===================================================================
--- trunk/server/core/src/main/scala/org/infinispan/server/core/CacheValue.scala	2010-04-12 14:34:20 UTC (rev 1684)
+++ trunk/server/core/src/main/scala/org/infinispan/server/core/CacheValue.scala	2010-04-13 06:56:41 UTC (rev 1685)
@@ -32,7 +32,7 @@
 
    override def readObject(input: ObjectInput): AnyRef = {
       val data = new Array[Byte](input.read())
-      input.read(data)
+      input.readFully(data)
       val version = input.readLong
       new CacheValue(data, version)
    }

Modified: trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/CacheKey.scala
===================================================================
--- trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/CacheKey.scala	2010-04-12 14:34:20 UTC (rev 1684)
+++ trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/CacheKey.scala	2010-04-13 06:56:41 UTC (rev 1685)
@@ -4,6 +4,7 @@
 import java.util.Arrays
 import org.infinispan.marshall.{Externalizer, Marshallable}
 import java.io.{ObjectInput, ObjectOutput}
+import org.infinispan.server.core.Logging
 
 /**
  * // TODO: Document this
@@ -42,7 +43,7 @@
 
    override def readObject(input: ObjectInput): AnyRef = {
       val data = new Array[Byte](input.read())
-      input.read(data)
+      input.readFully(data)
       new CacheKey(data)
    }
 }
\ No newline at end of file

Modified: trunk/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodReplicationTest.scala
===================================================================
--- trunk/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodReplicationTest.scala	2010-04-12 14:34:20 UTC (rev 1684)
+++ trunk/server/hotrod/src/test/scala/org/infinispan/server/hotrod/HotRodReplicationTest.scala	2010-04-13 06:56:41 UTC (rev 1685)
@@ -43,14 +43,14 @@
       servers.foreach(_.stop)
    }
 
-   def tesReplicatedPut(m: Method) {
+   def testReplicatedPut(m: Method) {
       val putSt = clients.head.put(k(m) , 0, 0, v(m))
       assertStatus(putSt, Success)
       val (getSt, actual) = clients.tail.head.get(k(m), 0)
       assertSuccess(getSt, v(m), actual)
    }
 
-   def tesReplicatedPutIfAbsent(m: Method) {
+   def testReplicatedPutIfAbsent(m: Method) {
       val (getSt, actual) = clients.head.assertGet(m)
       assertKeyDoesNotExist(getSt, actual)
       val (getSt2, actual2) = clients.tail.head.assertGet(m)



More information about the infinispan-commits mailing list