Skip to content

DEFECT#2334085_spring7-upgrade-issue-fixes - #3

Open
rguruopentext wants to merge 1 commit into
ppm-upgrade-alignmentfrom
DEFECT#2334085_spring7-upgrade-issue-fixes
Open

rguruopentext wants to merge 1 commit into
ppm-upgrade-alignmentfrom
DEFECT#2334085_spring7-upgrade-issue-fixes

Conversation

@rguruopentext

Copy link
Copy Markdown
Collaborator

Problem Statement

After migrating from Apache Wink REST client to Spring RestTemplate, the connector's JSON response handling changed behavior:

  • Old Wink behavior: Null-valued fields were omitted from parsed JSON objects.
  • New Spring behavior: Null-valued fields are included with value null in the response.

This inconsistency breaks downstream code that relies on the absence of null-valued keys to determine whether a field was set or unset in Jira API responses.

Solution

Implemented a minimal Jackson-based response normalization inside the JiraRestWrapper.executeRequest(...) method that:

  1. Parses each JSON response body using Jackson's ObjectMapper.
  2. Applies JsonInclude.Include.NON_NULL to strip null-valued object properties during serialization.
  3. Falls back to the original response body if parsing fails or the body is not JSON.
  4. Works transparently with all HTTP methods (GET, POST, PUT) without affecting callers.

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.

1 participant