-
-
Notifications
You must be signed in to change notification settings - Fork 385
Fix TypeMapperState.mappedTypes. #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…r are not equal, so using Class as map key will have mare than one entry in that map. Use type name instead.
|
thanks for the PR, does current impl (class as a map key) causes problems or this is only about optimization (limiting the map size) ? |
|
@bartoszwalacik yes, class as map key causing problem. Class loaded by different classloader is not the same instance. |
|
Ok but what kind of problem does it caus in javers? |
|
@hank-cp I understand the issue, you have two classes loaded by two classloaders. These classes have the same name but might have different properties. |
|
@bartoszwalacik I don't mean to add the second JaversType (with EntityType). I guess it's added automatically when Javers, when it's trying to find the best matching JaveryType for my class. In this case, Javers couldn't found my custom ValueTypeAdapter by the key, which is loaded by another classloader, so it wired EntityType for the best guess, thus cause my problem. |
|
ok, got it |
|
now I'm on holiday, I will merge this in next week |
|
one fix |
|
released in 2.1.2 |


Class loaded by different classLoader are not equal, so using Class as map key will have mare than one entry in that map. Use type name instead.
The failed test case could be reproduce when work with Spring-Boot 1.3+ and DevTools.