-
Bug
-
Resolution: Done
-
Major
-
5.2.0.Final
-
None
-
None
The TestObjectStreamMarshaller.objectFromByteBuffer(byte[], int, int) method does not actually pass the array with offsets. The code made a copy using the offset and size, but then passes the wrong byte array in. This is causing some issues with some tests I am writing for a CacheStore that I had to work around for now.
I personally don't see why it creates a copy of the array when it could just pass in the offset and size directly and not incur the cost of copying the byte array again. I have a fix that just passes the offset and index directly to the ByteArrayInputStream instead of doing the copy. If you feel that the copy is still needed obviously then just change it to pass in newBytes as the change instead.
I will attach a pull request soon.