Skip to content

[ISSUE #10927] Upgrade fastjson2 to 2.0.64 for JDK 8 compatibility - #10928

Open
RongtongJin wants to merge 1 commit into
apache:developfrom
RongtongJin:codex/fastjson2-2.0.64
Open

[ISSUE #10927] Upgrade fastjson2 to 2.0.64 for JDK 8 compatibility#10928
RongtongJin wants to merge 1 commit into
apache:developfrom
RongtongJin:codex/fastjson2-2.0.64

Conversation

@RongtongJin

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Brief Description

RocketMQ upgraded the Maven fastjson2 dependency to 2.0.63 in #10715. That version contains a JDK 8 cold-start regression which may throw:

LambdaConversionException: Invalid caller

The regression is fixed upstream in fastjson2 2.0.64:

This change:

  • upgrades the Maven fastjson2 version from 2.0.63 to 2.0.64;
  • aligns the Bazel fastjson2 pin from 2.0.59 to 2.0.64;
  • does not add a RocketMQ-specific initialization-order workaround.

How Did You Test This Change?

Using Amazon Corretto 1.8.0_502-b07 in a fresh JVM, I ran:

mvn -B -ntp -nsu -pl remoting -am \
  -Djacoco.skip=true \
  -Dtest=RemotingSerializableCompatTest \
  -Dsurefire.failIfNoSpecifiedTests=false \
  clean test

Results under the same environment and test command:

fastjson2 Result
2.0.63 FAILED — 2 tests, 1 error, LambdaConversionException
2.0.64 PASSED — 2 tests, 0 failures/errors

Additional verification:

  • mvn -pl remoting -am -DskipTests package: passed;
  • Maven dependency tree for common and remoting: resolves fastjson2 2.0.64 only;
  • Maven and Bazel dependency pins are aligned at 2.0.64;
  • git diff --check: passed.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.32%. Comparing base (7eee0fc) to head (051381a).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10928      +/-   ##
=============================================
- Coverage      48.45%   48.32%   -0.14%     
+ Complexity     13588    13546      -42     
=============================================
  Files           1380     1380              
  Lines         101196   101196              
  Branches       13130    13130              
=============================================
- Hits           49038    48902     -136     
- Misses         46190    46297     +107     
- Partials        5968     5997      +29     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Summary

Upgrades fastjson2 from 2.0.63 → 2.0.64 (Maven) and aligns the Bazel pin from 2.0.59 → 2.0.64. This fixes a known JDK 8 cold-start regression (LambdaConversionException: Invalid caller) documented in fastjson2#7691.

Changes reviewed:

  • pom.xml: fastjson2.version 2.0.63 → 2.0.64 ✓
  • WORKSPACE: Bazel fastjson2 pin 2.0.59 → 2.0.64 ✓

Assessment:

  • Both build systems (Maven + Bazel) are now aligned at 2.0.64
  • All 10 CI checks pass (CodeQL, Bazel compile, Maven compile on JDK-8 × 3 platforms, coverage, license, misspell)
  • PR description includes reproduction evidence and upstream fix references
  • No API changes, no behavioral changes beyond the bugfix

LGTM — clean, minimal dependency upgrade with clear justification.


Automated review by RockteMQ-AI

@fuyou001 fuyou001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

[Bug] fastjson2 2.0.63 fails on JDK 8 cold start with LambdaConversionException

4 participants