Branch: refs/heads/master
Home:
https://github.com/resteasy/Resteasy
Commit: 6866e3ff2cd74402fb7250c50690ab31c39271a2
https://github.com/resteasy/Resteasy/commit/6866e3ff2cd74402fb7250c50690a...
Author: Alessio Soldano <asoldano(a)redhat.com>
Date: 2019-07-18 (Thu, 18 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.