Branch: refs/heads/3.9
Home:
https://github.com/resteasy/Resteasy
Commit: 521e5c12c840bc503043af5e08a50f19dcb27293
https://github.com/resteasy/Resteasy/commit/521e5c12c840bc503043af5e08a50...
Author: Alessio Soldano <asoldano(a)redhat.com>
Date: 2019-07-19 (Fri, 19 Jul 2019)
Changed paths:
M
providers/jackson2/src/main/java/org/jboss/resteasy/plugins/providers/jackson/ResteasyJackson2Provider.java
Log Message:
-----------
[RESTEASY-2304] ResteasyJackson2Provider: fix ConcurrentHashMap contention (#1985)
Replace Jackson's AnnotationBundleKey with an implementation that uses `.equals()`
instead of `==` to compare annotations. AnnotationBundleKey assumed annotation references
were unique which breaks because the JRE doesn't cache parameter annotations,
returning new references each time parameter annotations are queried. This was causing a
severe performance degradation over time since matching ClassAnnotationKey instances had
the same `hashCode` while failing equality checks, leading to a large and growing single
bucket with identical objects and lock contention.