Skip to content

Commit 49835f4

Browse files
committed
Add missing equals definition on DictionaryWrapper
1 parent 983aed8 commit 49835f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/src/scala/collection/convert/JavaCollectionWrappers.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,13 @@ private[collection] object JavaCollectionWrappers extends Serializable {
552552
} catch {
553553
case ex: ClassCastException => null.asInstanceOf[V]
554554
}
555+
556+
override def equals(other: Any): Boolean = other match {
557+
case that: DictionaryWrapper[_, _] => this.underlying == that.underlying
558+
case _ => false
559+
}
560+
561+
override def hashCode: Int = underlying.hashCode()
555562
}
556563

557564
@SerialVersionUID(3L)

0 commit comments

Comments
 (0)