-
-
Notifications
You must be signed in to change notification settings - Fork 492
Closed
Labels
Description
About this issue
Incorrect equals()
implementation in BaseItem
.
Here's how the implementation looks like
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other == null || javaClass != other.javaClass) return false
val that = other as? AbstractItem<*>?
return identifier == that?.identifier
}
The line val that = other as? AbstractItem<*>?
should be replaced with val that = other as? BaseItem<*>?
, as not all subclasses of BaseItem
extend AbstractItem
.
As an example AbstractBindingItem
extends BaseItem
directly, thus the equals() fails on it.
Details
- [5.1.0] Used library version
Checklist
- Searched for similar issues