Commit 3f0c3480 authored by Aurash Mahbod's avatar Aurash Mahbod Committed by Max Cai
Browse files

Allow for ref-type arrays containing null elements.

Strip the null elements out before serializing the array.
This is helpful in the cases where the user wants to construct
an array of an inexact size for serialization. For example:
User constructs array of size 5 because they anticipate adding
more than 1 element before serialization. Only 3 get added, so
the array looks like [Obj, Obj, Obj, null, null]. This would
curently crash without this CL.

All repeated fields of ref-type elements can contain null
elements: repeated strings, repeated bytes, and repeated
messages/groups.

Change-Id: I117391c868c9a436536d70d6151780e9cc7e8227

Conflicts:
	src/google/protobuf/compiler/javanano/javanano_message_field.cc
parent 885f959b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment