Protobuf has mutliple public parameterless methods that create the type in the builder:
getDefaultInstanceForType
build
buildPartial
Currently we pick getDefaultInstanceForType without any error. This is clearly a mistake and we should either:
- not pick any and error out so the user can define a custom SPI that would pick the correct
- provide a custom SPI for Protobuf that would pick the
build method.
An example code can be found here. The CompetitionMapper can be adjusted to map into PBCompetition instead of PBCompetition.Builder
Protobuf has mutliple public parameterless methods that create the type in the builder:
getDefaultInstanceForTypebuildbuildPartialCurrently we pick
getDefaultInstanceForTypewithout any error. This is clearly a mistake and we should either:buildmethod.An example code can be found here. The
CompetitionMappercan be adjusted to map intoPBCompetitioninstead ofPBCompetition.Builder