Skip to content

Commit

Permalink
Yet more safe and efficient removing of keys without an internal `toS…
Browse files Browse the repository at this point in the history
…et` call that isn't safe: scala/bug#11203
  • Loading branch information
plokhotnyuk committed Aug 17, 2019
1 parent 44bb429 commit fe2be91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/github/pathikrit/dijon/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ package object dijon {
a.foreach { case (k, v) =>
res.put(k, if (b.contains(k)) v ++ b(k) else v.deepCopy)
}
b.keys.foreach { k =>
if (!res.containsKey(k)) res.put(k, b(k).deepCopy)
b.foreach { case (k, v) =>
if (!res.containsKey(k)) res.put(k, v.deepCopy)
}
res.asScala
case _ => that.deepCopy
Expand Down

0 comments on commit fe2be91

Please sign in to comment.