Skip to content

fix: tolerate an empty fields array in FileInfo - #437

Closed
TianHengZhuang wants to merge 1 commit into
crowdin:masterfrom
TianHengZhuang:fix-fileinfo-empty-fields-435
Closed

TianHengZhuang wants to merge 1 commit into
crowdin:masterfrom
TianHengZhuang:fix-fileinfo-empty-fields-435

Conversation

@TianHengZhuang

Copy link
Copy Markdown

The Enterprise API returns an empty array for a file with no custom fields:

"fields": []

FileInfo.fields is a Map<String, Object>, so Jackson throws a MismatchedInputException
on that response. This deserializes an empty array as null (the same as a missing value),
using the existing EmptyArrayToNullDeserializer that the other map fields already use.

Closes #435

@andrii-bodnar

Copy link
Copy Markdown
Member

Thanks for the contribution! I'm closing this, because it duplicates #436

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.

FileInfo.fields fails to deserialize when API returns an empty array

2 participants