Skip to content

fix(core): use Jackson 2.x-compatible JsonNode.fields() in JsonValue.asObject() - #19

Open
wssab314 wants to merge 1 commit into
QoderAI:mainfrom
wssab314:fix/jackson-2x-fields-compat
Open

wssab314 wants to merge 1 commit into
QoderAI:mainfrom
wssab314:fix/jackson-2x-fields-compat

Conversation

@wssab314

Copy link
Copy Markdown

Change

Replace Jackson 2.19+ JsonNode.properties() in JsonValue.asObject() (src/main/java/com/qoder/cloudagents/core/JsonValue.java) with the Jackson 2.x-compatible JsonNode.fields() iterator (annotated with @SuppressWarnings("deprecation")).

Because jackson-databind is declared as an unshaded transitive dependency, consumers whose dependency management pins Jackson 2.13–2.18 (such as Spring Boot 2.x and 3.0–3.4) previously crashed at runtime with NoSuchMethodError: com.fasterxml.jackson.databind.JsonNode.properties(). This change preserves identical LinkedHashMap insertion ordering and unmodifiable map semantics across Jackson 2.13–2.21+.

Java-specific change (no Go / Python / TypeScript impact). Non-breaking.

Fixes #18

Validation

  • SDK build, tests and Javadoc pass (./mvnw -B -ntp clean verify on Zulu OpenJDK 17.0.15: 1,277 tests, 0 failures, 0 errors; jar/sources/javadoc built cleanly).
  • Independent examples consumer (examples/pom.xml) — will be verified by CI 5-JDK matrix (clean install + examples/pom.xml clean verify).
  • Java 8 package check passes (python3 .github/scripts/check_package.py: class_count: 1252, class_major_version: 52).
  • Documentation and changelog reflect public behavior changes (CHANGELOG.md updated under ## [Unreleased]).
  • make quality passes on JDK 17+ (Java format verified: 697 files, Repository checks passed, 38 script tests OK).
  • No version change.

Commands run locally on macOS arm64 / Zulu OpenJDK 17.0.15:

  • ./mvnw -B -ntp clean verify -> Tests run: 1277, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS
  • make quality -> PASS (697 files formatted, 127 local links OK, 38 tests OK)
  • python3 .github/scripts/check_package.py -> PASS (class_major_version: 52)

…asObject()

Replace Jackson 2.19+ JsonNode.properties() in JsonValue.asObject() with JsonNode.fields() so applications pinned to Jackson 2.13-2.18 (such as Spring Boot 2.x and 3.0-3.4) do not fail with NoSuchMethodError at runtime.

Fixes QoderAI#18
@wssab314
wssab314 requested a review from moonyue-w as a code owner November 24, 2026 05:17
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.

fix(core): avoid Jackson 2.19+ JsonNode.properties() in JsonValue.asObject() for Spring Boot compatibility

1 participant