Fix NPE when importing config without metadata file#14795
Fix NPE when importing config without metadata file#14795Senrian wants to merge 1 commit intoalibaba:masterfrom
Conversation
Issue: alibaba#14785 Add null check for metaDataItem before calling getItemData().
|
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
|
I don't get the reason why add a new api to do metadata? |
|
Hi @KomachiSion, this PR does not add a new API. It only adds a null check in the existing |
|
Please change the basic branch to |
Bug Description
Issue: #14785
When importing a ZIP configuration file without the required metadata file (
.meta.ymlor.metadata.yml), the server throws a NullPointerException:Root Cause
In
ConfigControllerV3.parseImportDataV2(), the code directly callsmetaDataItem.getItemData()without checking ifmetaDataItemis null.Fix
Add a null check before accessing
metaDataItem: