Skip to content

Migrate to Jackson3#1176

Open
jonesbusy wants to merge 3 commits intojenkinsci:masterfrom
jonesbusy:feature/jackson3
Open

Migrate to Jackson3#1176
jonesbusy wants to merge 3 commits intojenkinsci:masterfrom
jonesbusy:feature/jackson3

Conversation

@jonesbusy
Copy link
Copy Markdown

@jonesbusy jonesbusy commented Mar 1, 2026

Migrate to Jackson3

Jackson2 remains a dependency because of scribejava-core (looks like a dormant library still supporting Java 7. So I have some doubt it will ever be migrated to Jackson3. Just in case I submited a PR for this library as well: scribejava/scribejava#1088)

I just rely on existing tests

Feel free to take a look at this PR or park it for later

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.

@jonesbusy jonesbusy force-pushed the feature/jackson3 branch 3 times, most recently from 61aea30 to 535295b Compare March 2, 2026 15:46
@jonesbusy jonesbusy marked this pull request as ready for review March 2, 2026 16:10
@jonesbusy
Copy link
Copy Markdown
Author

If any interest @nfalco79

this.hash = hash;
}

@JsonProperty("hash")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what this setter is used for? Does jackson 3 fails to use setHash method?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember the cause, but one test was failing. I think there was a confusion with "hash" an "id" field at some point.

I don't know much more about the codebase or webhook payload.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this BitbucketServerPullRequestEventTest#updatePayload fail

        assertThat(event.getPullRequest().getDestination().getCommit().getHash())
            .isEqualTo("d235f0c0aa22f4c75b2fb63b217e39e2d3c29f49");

which return null

Which confuses me is the "id" on the JsonCreator

    @JsonCreator
    public BitbucketServerCommit(@NonNull @JsonProperty("message") String message,
                                 @NonNull @JsonProperty("id") String hash,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants