Hide Forgot
project_key: EDG infinispan 4.2.0.FINAL issue: when I want to store byte array in the serialized form (mimetype: application/x-java-serialized-object) I can't get it back, because rest server returns it in raw form instead of serialized form. see https://github.com/infinispan/infinispan/blob/4.2.0.FINAL/server/rest/src/main/scala/org/infinispan/rest/Server.scala, line 44-50. the process is like this: 1. PUT bytearray in serialized form 2. rest server deserializes the bytearray and stores it in deserialized (raw) form 3. GET byte array (expecting serialized form) 4. rest server retrieves the byte array in raw form but doesn't serialize it, instead streams it in raw form - because of the above mentioned code.
testcase testByteArrayStorage() in https://anonsvn.jboss.org/repos/jbossas/branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/RESTClientTestCase.java
Link: Added: This issue depends ISPN-872
Michal, fyi, you can do comparison of contents of arrays via this static method: java.util.Arrays.equals(serializedData, serializedDataBack); This is much better than looping through the byte array yourself comparing each byte.
cool, thx :-) I knew there must be a nicer way!
Michal, just something I wanted to verify about your test. When you execute it and you trace it through, the get() op, in line 39 of Server.scala, it returns an application/xml variant in your case as well?
Can you try your test making sure that you add this header in the get request? get.setRequestHeader("Accept", "application/x-java-serialized-object")
Something else is needed on top of that.
updated the test, still the same result ...