[infinispan-issues] [JBoss JIRA] (ISPN-2167) TestObjectStreamMarshaller doesn't use offset and size arguments
Galder Zamarreño (JIRA)
jira-events at lists.jboss.org
Mon Jul 23 05:23:07 EDT 2012
[ https://issues.jboss.org/browse/ISPN-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder Zamarreño updated ISPN-2167:
-----------------------------------
Fix Version/s: 5.2.0.ALPHA3
Git Pull Request: https://github.com/infinispan/infinispan/pull/1222 (was: https://github.com/infinispan/infinispan/pull/1222)
> TestObjectStreamMarshaller doesn't use offset and size arguments
> ----------------------------------------------------------------
>
> Key: ISPN-2167
> URL: https://issues.jboss.org/browse/ISPN-2167
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 5.2.0.ALPHA1
> Reporter: William Burns
> Assignee: Galder Zamarreño
> Fix For: 5.2.0.ALPHA3
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list