[
https://issues.apache.org/jira/browse/CASSANDRA-3271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121550#comment-13121550
]
Jonathan Ellis commented on CASSANDRA-3271:
-------------------------------------------
{noformat}
+ else if (bufferOffset < 0
+ || bufferOffset > buffer.length
+ || count < 0
+ || bufferOffset + count > buffer.length
+ || bufferOffset + count < 0)
{noformat}
I think the 2nd and 5th predicates there are redundant -- e.g., if we know
bufferOffset and count are both positive, then we also know bufferOffset +
count is positive w/o needing to test it explicitly.
other than that, +1
> off-heap cache to use sun.misc.Unsafe instead of JNA
> ----------------------------------------------------
>
> Key: CASSANDRA-3271
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3271
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Pavel Yaskevich
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.1
>
> Attachments: 3271-v2.txt, CASSANDRA-3271-v3.patch,
> CASSANDRA-3271.patch
>
>
> Instead of requiring JNA for off-heap caches we should try to use
> sun.misc.Unsafe.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira