Skip to content

fix(sofa): compare metadata fields null safely - #7112

Merged
Aias00 merged 4 commits into
apache:masterfrom
dengliming:fix-6740-sofa-metadata-null-safe
Sep 22, 2026
Merged

Aias00 merged 4 commits into
apache:masterfrom
dengliming:fix-6740-sofa-metadata-null-safe

Conversation

@dengliming

Copy link
Copy Markdown
Member

Summary

  • compare Sofa metadata service and RPC extension fields null-safely
  • avoid update-time NPEs for metadata with omitted optional fields
  • add regression coverage with an initialized reference and null fields

Testing

  • mvn -q -pl shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-sofa -am -DskipTests=false -Dcheckstyle.skip=false -Dtest=SofaMetaDataHandlerTest -DfailIfNoTests=false test

Fixes #6740

@Aias00 Aias00 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.

Approved as PMC (Aias00). Reviewed the diff — small, well-scoped fix with regression tests; mergeable.

@Aias00
Aias00 merged commit 2811a62 into apache:master Sep 22, 2026
22 checks passed
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] SofaMetaDataHandler uses raw .equals on possibly-null fields → NPE

2 participants