Skip to content

Commit

Permalink
Common: replace use of erasure with runtimeClass (Closes snowplow#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
szareiangm committed Jul 3, 2020
1 parent 6a0e58a commit 8df198d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ object MapTransformer {
)(
implicit m: Manifest[T]
): ValidatedNel[FailureDetails.EnrichmentFailure, T] = {
val newInst = m.runtimeClass.newInstance()
val newInst = m.runtimeClass.getDeclaredConstructor().newInstance()
val result = _transform(newInst, sourceMap, transformMap, getSetters(m.runtimeClass))
// On success, replace the field count with the new instance
result.map(_ => newInst.asInstanceOf[T])
Expand Down

0 comments on commit 8df198d

Please sign in to comment.