Add jackson-module-spi-subtypes module - #229
Conversation
| if (list1.isEmpty()) return list2; | ||
| if (list2.isEmpty()) return list1; |
There was a problem hiding this comment.
If the two lists are null-safe, no need for empty checking.
|
Quick note: due to timing, decided that I will not try to get this in Jackson 2.16 -- so will need to be re-based to 2.17. For example, I think that naming of But I need to read the PR in bit more thought to make sure my feedback is relevant. |
|
Hello everyone! |
|
I totally forgot. If this was to be added, would need to re-base/re-create against 2.x branch. |
I've changed base to 2.x branch, and I checked the comments above, most of them have been modified, and the problems that haven't been solved include:
Because it's been a while. We can review the code again. |
|
This seems to fail on Java 8: if we are targeting Jackson 2.x, module should be Java 8 compatible. But looks like simple change to EDIT: done |
|
@black-06 Ok: I have some minor questions, but overall the only changes I do require are to naming:
and matching changes to Once naming is changed, I can get this merge in 2.x for inclusion in upcoming 2.21.0 release. |
|
@black-06 One other (hopefully last) thing: if you haven't yet sent CLA (I don't think so but just in case), we would need it from: https://github.com/FasterXML/jackson/blob/main/contributor-agreement.pdf This only needs to be done once, before merging the first PR: one is valid for all future contributions. Looking forward to getting this PR merged; thank you again for providing it! |
The name has been changed. In addition,
Thank you very much for your review, ps. CLA has been sent. |
|
@black-06 Thank you for doing all of that. I am hoping to go over PR one more time, get it merged, and soon prepare for 2.21.0 release that includes the new module! |
jackson-module-spi-subtypes module
Adds a module that allows subtype to be registered without annotating the parent class.
It is implemented on SPI.
See FasterXML/jackson-databind#2104
Its original version is https://github.com/black-06/jackson-modules-dynamic-subtype.
I removed the custom ServiceLoader and always use the standard library,
which means that pojo always needs a no-parameter constructor.