-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Cannot detect creator arguments of mixins for JDK types #2795
Comments
I don't think this would be intentional change, but I think I would need full reproduction. On reproduction: if possible, it would be good to use a POJO type instead Java 8 date/time type -- I suspect that should work as well. |
That's interesting. We've exactly the same case (static constructor in mixins) for POJO and it has not been affected. |
@marcospassos that is interesting indeed. |
Another interesting fact: other mixins for standard classes, such as |
Was about to suggest something about JDK classes, maybe inclusion (or not) of creator parameter names (although with annotations there, should not matter), but that should not matter then./ |
I have the exact same issue with a mixin for LocalTime and also Duration. While debugging I found the issue is in |
Ahh. Hmmh. Yes, I was afraid this attempted optimization to reduce startup costs might backfire. Tackling this issue is bit tricky just wrt reproduction: Java 8 date/time types can not be tested from 2.x databind (Java 8 dependencies not allowed in 2.x yet). I am also not sure how valuable ability to annotated those is, mostly because default Java 8 date/time module will not make any use of them. |
I guess it'd make sense to just apply mix-ins for JDK types (since they themselves can't have any)... but for that, type itself does need to be processed and optimization might not be worth much. At any rate, having a test for JDK type available in JDK 7 or earlier, not handled by explicit deserializer, would make sense. |
Hi,
This is our module
And this is the Mixin
our test passed with jacksson version 2.10.5 and failed with 2.11.2 version. |
@ausema Compatibility breakage is unfortunate, but I will have to say that usage as shown is very very fragile and could quite easily break when JDK changed its implementation of collection types accessible via That said I hope this can still be addressed. |
Ok, so, first fix in (for 2.11.3) and makes @ausema's case work at least. Will see if that also solves Java 8 date/time, and if not, what to do there. |
Ok, some good and bad news wrt @marcospassos' original issue:
I'll have to think about this a bit. Adding a |
I've upgraded our project from 2.10.1 to 2.11.1 and a test case is now failing. For for weird reason, a static constructor defined via mixin no longer works:
Mixin:
Module:
Error:
Any idea on what can have caused this BC break?
The text was updated successfully, but these errors were encountered: