Skip to content

Commit

Permalink
Replace hardcoded codec
Browse files Browse the repository at this point in the history
codecRegistryWithNullSerialization was hardCoded. Trying to fix Litote#115
  • Loading branch information
qcho authored Feb 19, 2019
1 parent 6ee4ee3 commit c840b6d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ internal class PojoClassMappingTypeService : ClassMappingTypeService {
override fun filterIdToBson(obj: Any): BsonDocument {
val bsonDocument = BsonDocument()
val bsonWriter = BsonDocumentWriter(bsonDocument)
codecRegistryWithNullSerialization
ClassMappingType.codecRegistry(MongoClientSettings.getDefaultCodecRegistry())
.get(obj.javaClass)
?.encode(
bsonWriter,
Expand Down Expand Up @@ -139,4 +139,4 @@ internal class PojoClassMappingTypeService : ClassMappingTypeService {
} ?: property.name
}
}
}
}

0 comments on commit c840b6d

Please sign in to comment.