Skip to content

Commit

Permalink
remove Load mapping classes eagerly
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigogdea committed May 28, 2021
1 parent 1ae6844 commit 3ea7ef4
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ class ReactiveMongoEventSerializer(
private implicit val defaultTimeout: Timeout = Timeout(15.seconds)

def addAdaptersAsync(adapters: Seq[EventAdapter[_]]): Future[Done] = {
//Load mapping classes eagerly
adapters.foreach{ adapter =>
Try(adapter.toBson(null))
Try(adapter.bsonToPayload(BSONDocument.empty))
}
serializer
.ask(ref => SerializerBehavior.AddAdapters(adapters, ref))
}
Expand Down

0 comments on commit 3ea7ef4

Please sign in to comment.