-
Notifications
You must be signed in to change notification settings - Fork 212
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
[BEANUTILS-541] FluentPropertyBeanIntrospector caches corrupted writeMethod (2.x) #68
Conversation
1552206
to
0ab6c3f
Compare
* @return the descriptor | ||
* @throws IntrospectionException if an error occurs | ||
*/ | ||
private PropertyDescriptor createFluentPropertyDescritor(final Method m, | ||
final String propertyName) throws IntrospectionException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propertyName
argument is redundant in private method
Backported for 1.x in #69 |
Hi @seregamorph |
0ab6c3f
to
54381a1
Compare
@garydgregory thanks for your reply. The branch is rebased. |
Please take this issue and PR into consideration before releasing |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #68 +/- ##
============================================
+ Coverage 65.06% 65.13% +0.07%
- Complexity 1484 1517 +33
============================================
Files 105 111 +6
Lines 5504 5650 +146
Branches 1068 1086 +18
============================================
+ Hits 3581 3680 +99
- Misses 1464 1490 +26
- Partials 459 480 +21 ☔ View full report in Codecov by Sentry. |
Thank you for accepting @garydgregory |
@seregamorph YW |
@garydgregory I just realized this solution makes the situation much better, but in an environment with high concurrency the issue can be still reproducible (pretty hard to reproduce). |
https://issues.apache.org/jira/browse/BEANUTILS-541
There is an issue in FluentPropertyBeanIntrospector (at line 144 for 1.9.3), it caches wrong writeMethod in the static cache of java.beans.Introspector when base class has at least two subclasses. Simple snippet to reproduce can be found in covering
Jira541TestCase
(revertFluentPropertyBeanIntrospector.java
changes locally and you'll see the failure).It is critical, because wrong information is stored globally unless explicit
Introspector.flushCaches (or Introspector.flushFromCaches)
is called.