cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12381) Verify use of ByteBuffer.hasArray() in whole code base
Date Thu, 04 Aug 2016 14:34:21 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-12381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15407856#comment-15407856
] 

Sylvain Lebresne commented on CASSANDRA-12381:
----------------------------------------------

In the absence of anyone reporting this as being a problem, this is definitively not critical
(and in fact minor as you yourself set) so this should not go in 2.1, nor imo in 2.2, no matter
how simple the patch is (still pretty easy to forget some negation somewhere and having that
slip).

> Verify use of ByteBuffer.hasArray() in whole code base
> ------------------------------------------------------
>
>                 Key: CASSANDRA-12381
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12381
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 2.1.x
>
>
> As [noted here|https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html#allocateDirect-int-],
a direct {{ByteBuffer}} can have a backing array.
> If a direct {{ByteBuffer}} has a backing array, we should not make any assumption on
how it is actually used.
> This ticket is about to check whether uses of {{ByteBuffer.hasArray()}} need to be replaced
with {{ByteBuffer.isDirect()}}.
> (With CASSANDRA-11870 however, there is no way that such a direct {{ByteBuffer}} has
a backing array.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message