jhalterman/modelmapper — pull request #120 by Nthalk (2014-09-14 09:31:52+00:00)
Title: Added support for fragile proxies

When proxies are added to the proxyInterceptors map, the previous `HashMap` collection called `proxy.hashCode()`, which may rely on internal state of fields within the proxy.

In my case, it was a generated jooq record that calls `fields.size()`, and since `fields` on the proxy object returns null, it triggers a NPE on `HashMap.put`.

The `IdentityHashMap` doesn't use `hashCode` for equality, but pointer equality, which seems ok given that you only use one proxy object for the lifecycle of the explicit mapping.