I investigated the issue, seems to be related to TypeFactory cache, that holds a WeakReference for the type that is not properly checked for nulls, and hence will return Null as Type.
Unfortunately there is no easy way to reproduce a WeakReference being GC'd, so I wasn't able to think of a unit test to share reproducing the problem.
Hello,
We are currently having intermittent problems during unit tests in our build that breaks because of a NPE in Orika.
Here is my fix: https://github.com/orika-mapper/orika/pull/342/files
I investigated the issue, seems to be related to TypeFactory cache, that holds a WeakReference for the type that is not properly checked for nulls, and hence will return Null as Type.
Unfortunately there is no easy way to reproduce a WeakReference being GC'd, so I wasn't able to think of a unit test to share reproducing the problem.