FasterXML / FasterXML/jackson-dataformats-binary

Honor `READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE` feature with Protobuf

未關閉
#398 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
protobuf
主要語言
Java
星號
347
分支
156
平均合併
3 天 3 小時
30 天內合併 PR
22

描述

The wire plugin uses a mechanism of fall-back to default enum value (index 0) when the index is above the one in the schema, this ensure we don't break compatibility when they add a new field upstream, our system still can deserialize the message by fall-back on the default value. Of course some systems want that an exception be thrown when encountering an unknown value.

This behaviour could be setup (enabled or disabled) through the standard DeserializationFeature: READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE

if true we fall-back on the default enum value (index 0) and if false we throw an exception.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。