feat!: migrate from Jackson 2 to Jackson 3 - #1571
Open
yvasyliev wants to merge 30 commits into
Open
Conversation
…o`; revert code format; rename instance variable
…ndencies management with BOM imports
Contributor
Author
|
Hi @rubenlagus while we're waiting for the Lombok stable release, could you please start an initial review? Thank you! |
rubenlagus
force-pushed
the
dev
branch
2 times, most recently
from
July 10, 2026 23:57
acdc9a2 to
970df19
Compare
# Conflicts: # pom.xml # telegrambots-abilities/pom.xml # telegrambots-client-jetty-adapter/pom.xml # telegrambots-client/pom.xml # telegrambots-extensions/README.md # telegrambots-extensions/pom.xml # telegrambots-longpolling/pom.xml # telegrambots-meta/pom.xml # telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/inputmessagecontent/serialization/InputMessageContentDeserializer.java # telegrambots-springboot-longpolling-starter/pom.xml # telegrambots-springboot-webhook-starter/pom.xml # telegrambots-test-reports/pom.xml # telegrambots-webhook/pom.xml # telegrambots-webhook/src/main/java/org/telegram/telegrambots/webhook/TelegramBotsWebhookApplication.java
yvasyliev
marked this pull request as ready for review
July 23, 2026 16:45
Contributor
Author
|
The PR is ready for the review |
… cases Add tests for the wire forms that caused webhook queue-poisoning and long-polling retry loops: typed RichText objects (e.g. bold) whose nested text field arrives as a bare JSON string rather than a typed object, and the corresponding array/concat forms. Also adds an end-to-end Message deserialization test reproducing the exact payload from the issue report. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts: # telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/objects/richtext/TestRichMessage.java
Contributor
Author
|
Conflicts are resolved |
Contributor
Author
|
The build is fixed |
Contributor
Author
|
@rubenlagus could you please share the build logs? I'm not able to reproduce the failure: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Please squash and merge this PR if it gets approved.
As part of #1561 suggestion, I'm creating this request to migrate
TelegramBotsfrom Jackson 2 to Jackson 3.Changelist
Based on the Jackson 3 Migration Guide, the next changes were applied.
Cross-module
The following changes were applied to all modules:
com.fasterxml.jackson.*Jackson 2 dependencies were replaced with a singletools.jackson.coreJackson 3 dependency.1.18.34to1.18.44to make@Jacksonizedannotation compatible with Jackson 3.5.12.2to6.0.3; added BOM import.5.12.0to5.21.0; added BOM import.lombok.configfile to enable Jackson 3-compatible@Jacksonizedconfiguration.com.fasterxml.jackson.*Jackson 2 package imports withtools.jackson.*Jackson 3 package imports where relevant across the code.ObjectMapperwith Jackson 3JsonMapper(a core JSON reader/writer in Jackson 3) across the code.IOExceptionwithJacksonException(extendsRuntimeException) in thethrowslists andcatchblocks where relevant across the code.JsonMapper.Module-specific
The following changes were applied to specific modules only:
telegrambots-metaorg.telegram.telegrambots.meta.api.objects.InputFileSerializerwithorg.telegram.telegrambots.meta.api.objects.InputFileConverter.org.telegram.telegrambots.meta.api.objects.inlinequery.inputmessagecontent.serialization.InputMessageContentDeserializerwas removed in favor of@com.fasterxml.jackson.annotation.JsonTypeInfo.@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)toorg.telegram.telegrambots.meta.api.objects.Contactandorg.telegram.telegrambots.meta.api.objects.stories.StoryAreaPositionto make Jackson 3 ignore getters during serialization. Without it, Jackson 3 will create an extra field in a serialized object (e.g.,vcardandVCard).org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException.telegrambots-webhook7.0.1to7.2.2.io.javalin.json.JavalinJackson3is now used as Javalin's JSON mapper.telegrambots-abilitiesPolymorphicTypeValidatorconfiguration, because the default one doesn't pass all tests.Closes #1561