FasterXML / FasterXML/jackson-dataformats-binary

Honor `READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE` feature with Protobuf

Ouverte
#398 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
protobuf
Langage dominant
Java
Étoiles
347
Forks
156
Merge moyen
3 j 3 h
PR mergées (30 j)
22

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.