cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-14588) Unfiltered.isEmpty conflicts with Row extends AbstractCollection.isEmpty
Date Tue, 31 Jul 2018 16:26:00 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-14588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedict updated CASSANDRA-14588:
---------------------------------
    Status: Patch Available  (was: Open)

[3.0 patch|https://github.com/belliottsmith/cassandra/tree/CASSANDRA-14588-3.0]; [Circle CI|https://circleci.com/workflow-run/345bec8d-f6eb-4654-b33b-2942752d1ba6]

> Unfiltered.isEmpty conflicts with Row extends AbstractCollection.isEmpty
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14588
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14588
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Minor
>             Fix For: 4.0, 3.0.x, 3.11.x
>
>
> The isEmpty() method’s definition for a Row is incompatible with that for a Collection. 
The former can return false even if there is no ColumnData for the row (i.e. the collection
is of size 0).
>  
> This currently, by chance, doesn’t cause us any problems.  But if we ever pass a Row
as a Collection to a method that invokes isEmpty() and then expects (for correctness) that
the _collection_ portion is not empty, it will fail.
>  
> We should probably have an asCollection() method to obtain a collection from a Row, and
not implement Collection directly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message