[BUG] SofaMetaDataHandler uses raw .equals on possibly-null fields → NPE
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 84/100
Research direction
Inspect shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-sofa/src/main/java/org/apache/shenyu/plugin/sofa/handler/SofaMetaDataHandler.java at lines 39 and 43, then compare the null-safe handling in AbstractDubboMetaDataHandler. Verify that a metadata re-handle event with null rpcExt or serviceName no longer throws an NPE.
Written by the indexing model from the issue text.
Description
- severity: Medium
- files:
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-sofa/src/main/java/org/apache/shenyu/plugin/sofa/handler/SofaMetaDataHandler.java:39,43 - description:
exist.getServiceName().equals(metaData.getServiceName())andexist.getRpcExt().equals(metaData.getRpcExt())without null-safety.MetaData.rpcExtdefaults to null. UnlikeAbstractDubboMetaDataHandlerwhich usesObjects.equals(...), the sofa handler NPEs if a registered metadata has nullrpcExt/serviceName. - impact: A metadata re-handle event for a sofa path whose
rpcExt/serviceNameis null throws NPE. - suggested_fix: Use
Objects.equals(...)(as the dubbo handler does). - confidence: Medium
- related_existing: none
Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/06-medium-tiers.md.
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 85
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/shenyu
-
plugin: mock priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
admin priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
[BUG] DivideIngressParser protocol[i++] throws AIOOBE when protocol array shorter than endpoints Openkubernetes priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[BUG] ContextPathParser concatenates null annotation value with /** — literal null/** rule condition Openkubernetes priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
kubernetes priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100