rgushel / protobuf-converter

protobuf-converter is library for transforming your Domain Model Objects into Google Protobuf Messages and vice versa.
MIT License
131 stars 44 forks source link

convert list field failure #3

Closed maobulang closed 7 years ago

maobulang commented 7 years ago

i have review the unit test, when i convert MultiMappingOwner to MultiMappingTest and the multiMappingListValue field is null , the convert will failure. i have check the source code, the createProtobufValueList method of the Converter class report the error, when the domainCollection parameter is null, the following code report the error: domainCollection.getClass()

could you help to fix the issue? or we have another way to avoid the error?

jsjem commented 7 years ago

It is a bug. For now, you must initialize collection fields of your domain objects as an empty collection.

jsjem commented 7 years ago

fixed