You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Igor Demydenko (JIRA)" <ji...@apache.org> on 2010/11/24 22:42:30 UTC
[jira] Issue Comment Edited: (CASSANDRA-1775) SlicePredicate
doesn't support the java.lang.Object.equals() method contract
[ https://issues.apache.org/jira/browse/CASSANDRA-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935515#action_12935515 ]
Igor Demydenko edited comment on CASSANDRA-1775 at 11/24/10 4:42 PM:
---------------------------------------------------------------------
Thanks,
Looks like truth :)
I haven't found this issue, so I have created the new issue.
Can I close the bug?
Thanks
was (Author: igor.demydenko):
Thanks,
Looks like truth :)
I haven't found this issue, so I have created the new issue.
Thanks
> SlicePredicate doesn't support the java.lang.Object.equals() method contract
> ----------------------------------------------------------------------------
>
> Key: CASSANDRA-1775
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1775
> Project: Cassandra
> Issue Type: Bug
> Components: API
> Affects Versions: 0.6.6
> Environment: apcahe cassandra 0.6.6
> lib thrift r917130
> Reporter: Igor Demydenko
> Priority: Minor
>
> SlicePredicate doesn't support the java.lang.Object.equals() method contract.
> Execute following test:
> {code:title=SlicePredicateTest.java}
> public class SlicePredicateTest {
> private static final String ENCODING = "UTF-8";
> private static final String COLUMN_NAME = "ColumnName";
> @Test
> public void testEquals() throws Exception {
> SlicePredicate predicate = new SlicePredicate();
> predicate.setColumn_names(Arrays.asList(COLUMN_NAME.getBytes(ENCODING)));
> SlicePredicate predicate2 = new SlicePredicate();
> predicate2.setColumn_names(Arrays.asList(COLUMN_NAME.getBytes(ENCODING)));
> SlicePredicate predicate3 = new SlicePredicate();
> predicate3.setColumn_names(Arrays.asList(COLUMN_NAME.getBytes(ENCODING)));
> assertFalse(predicate.equals(null)); // not null
> assertTrue(predicate.equals(predicate)); // reflexivity
> assertTrue(predicate.equals(predicate2) && predicate2.equals(predicate)); // symmetry
> assertTrue(predicate.equals(predicate2) && predicate2.equals(predicate3)
> && predicate.equals(predicate3)); // transitivity
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.