Skip to content

Commit

Permalink
Fix CollectionNameMapping instantiation (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
fonse authored Jan 29, 2020
1 parent e74df40 commit 3001eca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val rxmongoVersion = "0.18.8"

name := "akka-reactivemongo-plugin"
organization := "null-vector"
version := "1.2.10"
version := "1.2.11"
scalaVersion := scala213
crossScalaVersions := supportedScalaVersions
scalacOptions ++= Seq(
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/org/nullvector/ReactiveMongoDriver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class ReactiveMongoDriver(system: ExtendedActorSystem) extends Extension {
private val snapshotPrefix = system.settings.config.getString("akka-persistence-reactivemongo.prefix-collection-snapshot")
private val verifiedNames: mutable.HashSet[String] = mutable.HashSet[String]()

private val nameMapping: CollectionNameMapping = system.getClass.getClassLoader.loadClass(
private val nameMapping: CollectionNameMapping = system.dynamicAccess.getClassFor[CollectionNameMapping](
system.settings.config.getString("akka-persistence-reactivemongo.collection-name-mapping")
).newInstance().asInstanceOf[CollectionNameMapping]
).get.newInstance()

override def receive: Receive = {
case GetJournalCollectionNameFor(persistentId, promise) =>
Expand Down

0 comments on commit 3001eca

Please sign in to comment.